Configuration
Tracking Snippet
Configuring how the tracking snippet behaves.
The tracking snippet is a small piece of JavaScript code that you embed into your website to track visitor interactions. This document outlines how the tracking snippet works and how you can configure it.
Installation
Your tracking snippet is hosted on your analytics server. To install it on your website, you need to include the following script tag in the <head>
section of your website:
Configuration
The tracking snippet can be configured using the following options:
Option | Description |
---|---|
data-api | Optional hostname + path to the analytics server. Default is the domain where the script is being hosted. |
data-hash | Include this to track browser navigations for websites that use a hash router. |
Here’s an example of a fully configured tracking snippet:
Example