Web tracker
Last updated
Last updated
The Website Tracker allows users to monitor and analyze website activity by integrating a tracking script into their web pages. This guide provides detailed steps for setting up the tracker and configuring essential tracking events to ensure seamless data synchronization.
Before setting up the website tracker, ensure you have:
Access to your website's source code.
Permission to add scripts to the website.
A valid tracker script URL provided by your analytics provider.
To enable website tracking, insert the provided JavaScript code before the closing </head> tag of your website.
Instructions:
Copy the provided script.
Paste it before the closing </head> tag on every page where tracking is required.
Save and publish your website changes.
This script loads asynchronously, ensuring that website performance is not affected.
After initializing the tracker, you must implement specific tracking events to monitor user activity.
snowplow('setUserId', "USER_ID");
snowplow("trackPageView");
setUserId: Assigns a unique identifier to the user.
Replace USER_ID with the actual user ID from your system.
If no ID is available, pass null.
trackPageView: Logs a page view event whenever a user navigates to a new page.
This function should be called on every page load.
Tracker not loading? Ensure the script is correctly placed before </body>.
Events not firing? Check for JavaScript errors in the browser console.
Incorrect user ID? Ensure setUserId is called with the correct value.
Slow performance? Confirm the tracker script is loading asynchronously.
Following these steps will ensure proper setup and accurate event tracking for your website.