Web SDK
EARLY ACCESSTrack custom events with the Web SDK by installing the JavaScript library on your website. For event naming and tracking guidelines, see Events best practices.
Install the library
Before you start installing the library, we recommend you review the Web SDK documentation to learn more about how the Web SDK works and see the various methods available to you.
To use the Web SDK:
- Create an API key with the Web SDK role enabled.
- Visit the Manage API Keys (opens in a new tab) page on the web interface to create your API key.
- Once you have created your API key, edit the code to replace "Your API Key" in the
pe.init()call with your actual key.
Try it out
After installing the library, you can test event tracking:
- Select an event from the dropdown menu.
- Select a person from the dropdown menu.
- Select Send event.
This allows you to verify that your Web SDK integration is working correctly before deploying to production.