Script Tag Setup Guide
This guide walks you through setting up the PlayerZero SDK using a script tag to start monitoring and improving your frontend applications.
Prerequisites
- Access to your project’s frontend codebase.
- Your PlayerZero API Key.
Step-by-Step Instructions
1. Add the PlayerZero Script
Paste this inside your <head>
or just before the closing </body>
tag:
2. Initialize the SDK
Insert the initialization script after loading the PlayerZero SDK:
3. Identify the User (Recommended)
Once the user is authenticated or known:
Example Implementations
Single Page Application (SPA) Setup
Once PlayerZero has been initialized, the below snippet demonstrates how to call the playerzero.identify method and capture user details in PlayerZero.
Server Side Rendered (SSR) Setup
Once PlayerZero has been initialized, the below snippet demonstrates how to call the playerzero.identify method and capture user details in PlayerZero.
Next Steps
Once the SDK is installed and initialized, you can visit the Users page in PlayerZero to see live user sessions being captured.
If you want to control where PlayerZero is active, visit the Domain Settings guide to configure domain-level access and environment-specific behavior.
Want to extend your integration further? Explore the Advanced SDK Usage guide to unlock features like custom event tracking, devtools links, and user metadata enhancements.