Customizing the Tracking Script
The tracking snippet accepts optional data-* attributes that change how it behaves. The basic snippet only needs src and data-website-id; everything below is optional.
<script defer src="https://app.eurometrics.eu/script.js"
data-website-id="YOUR_WEBSITE_ID"></script>Available Attributes
Attribute | What it does |
|---|---|
| Required. The ID of the website in EuroMetrics. |
| Send collected data to a specific host instead of the script’s origin. |
| Set to |
| Set to |
| Set to |
| Set to |
| Comma-separated list of domains the tracker is allowed to run on. |
| Attach a tag to all events from this script, useful for grouping (e.g. environment or campaign). |
| Consent banner position: |
| URL of your privacy policy for the consent banner. |
| Legal name of the data controller shown in the consent banner. |
Examples
Ignore query strings (so /page?utm=... and /page are counted as one):
<script defer src="https://app.eurometrics.eu/script.js"
data-website-id="YOUR_WEBSITE_ID"
data-exclude-search="true"></script>Disable automatic pageviews and track manually with the JavaScript API:
<script defer src="https://app.eurometrics.eu/script.js"
data-website-id="YOUR_WEBSITE_ID"
data-auto-track="false"></script>A Note on UTM Parameters
Even though data-exclude-search removes query strings from the page URL, campaign parameters (utm_source, utm_medium, etc.) are still parsed for the UTM report before being stripped — so you can keep clean page URLs and still measure campaigns.
What’s Next?
Need help? Reach out to us at support@eurometrics.eu.



