Script
Learn how to add and configure the Oppla tracking script in your application.Installation
Basic Installation
Add the Oppla tracking script to your website’s<head>
section:
Async Loading
For better performance, load the script asynchronously:Configuration
Basic Configuration
Configure basic tracking settings:Advanced Configuration
Add advanced tracking options:Event Tracking
Track Events
Track events using the script:User Identification
Identify users:Data Attributes
Track Events with Data Attributes
Add data attributes to your HTML elements:Best Practices
- Load Early: Add the script as early as possible in the
<head>
- Use Async: Load the script asynchronously for better performance
- Configure Properly: Set up tracking options based on your needs
- Test Thoroughly: Verify tracking in development environment
Common Issues
Script Not Loading
- Check network connectivity
- Verify script URL is correct
- Check for JavaScript errors
- Ensure proper script placement
Events Not Tracking
- Verify initialization
- Check event names and properties
- Ensure proper timing of script loading
- Check for console errors