Skip to main content

Embed tracking snippet

Insert our analytics script first by adding the following somewhere inside the <head></head> of your page:

<script src="https://eventscout.io/analytics.min.js"></script>

Then, initialize the script by adding the following code snippet:

window.EventScout.init("YOUR_SOURCE_ID");

If you want to track events other than 'page_view', you can call the track method like so:

window.EventScout.track("event_name", { property: "value" });

Tracking users​

To track users, you can optionally pass the user id to the init method:

window.EventScout.init("_YOUR_SOURCE_ID", "USER_ID");

or at any time after initialization:

window.EventScout.setUserId("USER_ID");