Installing the tracker on your site
How to install the Admetriva snippet, how to add your domains, which collection policy to choose and why exact revenue comes from the server-to-server integration.
On this page
The Admetriva tracker measures the click → product view → cart → checkout → order journey on your site, using anonymous, random identifiers. It does not collect names, email, phone, address, customer ID or form text.
1. Add the domain
Open the project → Website Tracking → Tracking settings and add your store's domain. Each domain has its own card, with:
- a public token (
wtd_...), which you can regenerate; - a separate option to also accept subdomains;
- its snippet and its status: the last script load, the last event, the last order and the detected script version.
2. Install the snippet
Copy the snippet from the domain card and put it on every page of your store. It looks like this:
<script async src="https://admetriva.com/assets/client/admetriva.js" data-site-token="YOUR_DOMAIN_TOKEN"></script>
The script address does not contain the version. A new version of the script does not require any change to the snippet.
3. Event detection
The script reads, in order: GA4 e-commerce events already present in the dataLayer, structured product data on the page (JSON-LD), adapters for platforms such as WooCommerce and OpenCart and, if needed, a manual configuration. It never guesses an order ID. Reloading the confirmation page does not duplicate the order.
4. Choose the collection policy
| Policy | What it does |
|---|---|
| With consent (default) | The script creates no identifiers and sends nothing until your consent platform calls Admetriva.consent('grant'). |
| Always | Anonymous collection without a consent gate. By choosing it, you, as the site owner, take responsibility for the legal basis of the measurement. |
| Aggregate only | Only an anonymous counter per day and page, with no visitor data. |
| Hybrid | Aggregate without consent, attribution after consent. |
Admetriva.consent('revoke') stops collection and deletes the local identifiers.
5. Check
The Install & diagnostics page shows the active domains, the script version and how fresh the data is. The Live page shows recent events. If a domain stops sending anything, the page marks it “no recent signal”.
Limits of browser measurement
A script blocked by an ad blocker, a page closed too quickly or a checkout on another domain can lose events, including orders. The values are gross tracked revenue: cancellations and returns are not subtracted. For exact revenue, the store can send the real orders directly from its server, signed. The two sources are not added together: the server order remains the authoritative revenue, and the browser order feeds attribution.
Product views, not ad impressions
A “product view” is the opening of a product page on your site. The script cannot see ad impressions on Google or Meta. Impressions come from the platforms and are in the campaign and product reports.
Related articles
- Product attribution methodology How Admetriva splits each product sale between channels, with the Weighted Multi-Touch v1 model, the attribution window and worked examples.
- Common errors and what to do The messages you see most often in Admetriva, what each one means and the steps to fix it.
- Frequently asked questions Short answers to the most common questions about data, security, platforms and your subscription.
Didn’t find your answer? Write to us and we’ll help.
Contact