← Starting Page

Getting Started

Required Setup

Optional Setup

Data Studio Overview

Dashboards

Performance

Creatives

Settings

Help

Understand your reports

Tips and Tricks

Attribution Models

Bayesian Statistics

User Journey Tracking

Understand your Metrics

Metrics Overview

Product Level Metrics

Target Metrics

Data Loading

Data Updates

Data Loading Issues

Data Discrepancies

Frequently Asked Questions

Releases & ChangeLog

← How to enable tracking and consent

<aside> 💡 Written by tbd, last updated on tbd in tbd

</aside>

What you will learn in this article:

Tracking script for custom integrations

1. Setup tracking script on all pages

In case you run another shop system or website you need to add the following snippet to all pages (between <body> and </body> tag). Before adding the script, you need to replace the [SHOP_ID]with your specific shop ID and dynamically replace {{ CUSTOMER_ID }} with the customer ID (if available), alternatively you can set {{ CUSTOMER_ID }} to an empty string.

<script id="js-app-admq-data" type="application/json">
{
    "sid": "[SHOP_ID]",
    "cid": "{{ CUSTOMER_ID }}"
}
</script>
<script id="js-app-admq-script"
        type="application/javascript"
        src="<https://shopify.admetrics.events/conversion-v1.min.js>"
></script>

<aside> 💡 To retrieve the shop ID on Shopify you can go to https://YOURSHOP.myshopify.com/shop.json and search for "shopId". The number behind it is your shop ID.

</aside>

2. Set up conversion tracking

Add the following snippet to your order confirmation/status or thank_you page. Before adding the script, you need to replace the [SHOP_ID]with your specific shop ID.

You need to dynamically fill in {{ ORDER_ID }} with the order ID, {{ CUSTOMER_ID }} with the customer ID (if available). Alternatively you can set {{ CUSTOMER_ID }} to an empty string. You also need to replace {{ ORDER_NAME }} with the name of the order, or alternatively set it to the {{ ORDER_ID }}.

<script id="js-app-admq-data" type="application/json">
{
    "sid": "[SHOP_ID]",
    "oid": "{{ ORDER_ID }}",
    "cid": "{{ CUSTOMER_ID }}",
    "on": "{{ ORDER_NAME }}"
}
</script>
<script id="js-app-admq-script"
        src="<https://shopify.admetrics.events/conversion-v1.min.js>"
></script>

Did this article answer your question?