Skip to main content

Implement Adtriba's Conversion Tracking in Shopify

How to make the Adtriba Conversion tracking work if you are using Shopify

Note: Adtriba Core is a legacy feature that we continue to support but no longer sell. The latest version of this feature is available as Funnel Measurement.
If you are already using Funnel Measurement, find more information here. To upgrade, contact us.

Implement Adtriba conversion tracking on Shopify order confirmation pages.

If your shop runs on Shopify, integrate Adtriba basic tracking via a tag management system. For conversion tracking on the order success page, follow this Shopify article.

Tracking pixels

Add tracking pixels to your order status page in the Additional scripts box.

Tracking orders

Add conversion tracking codes (such as a tracking pixel) to track customer purchases. Place tracking codes on the order status page.

Tracking scripts come from a third party. Add them as a code snippet in your Shopify admin.

Steps

  1. Copy your tracking code from the Adtriba Console in Project Settings (cmd + c on Mac, ctrl + c on PC).

  2. In your Shopify admin, go to Settings > Checkout.

  3. Under Order processing, open the Additional scripts text box.

  4. Paste the tracking code (cmd + v on Mac, ctrl + v on PC).

Tip

Customers can return to the order status page multiple times. This can skew conversion analytics. Run scripts on the first visit only.

Conditional integration

Some providers require tracking pixels only when the customer arrives with a specific reference parameter (usually ref, source, or r).

Shopify stores these values with orders and exposes them as landing_site_ref.

For example, an affiliate provider may require their pixel in checkout only for referred customers. Register a URL like this with your tracking system:

http://www.example.com/?ref=tracking-site

The ?ref=tracking-site value must be unique.

Shopify uses this value on the last checkout page to verify that the order came from an affiliate referral.

To set up conditional integration, go to your Checkout settings page and add the Adtriba conversion script:

{% if landing_site_ref == 'tracking-site' %}   
<script type="text/javascript">  
window.adtriba = window.adtriba || [];  
window.adtriba.push(["conversion", "Transaction", {  
id: {{ order_number }},  
revenue: {{ total_price | money_without_currency }},  
currency: {{ currency }}  
}]);  
</script>

The if landing_site_ref == 'tracking-site' statement displays the pixel only to customers with the correct landing_site_ref.

Examples

Use these Liquid tags:

  • Order total price: {{ total_price | money_without_currency }}

  • Unique order ID. order_number prints the order name such as #2322 without the hash character: {{ order_number }}

  • Order currency. Hardcode the currency or use {{ currency }}

Replace the placeholders in the tracking code with these Liquid tags:

<script type="text/javascript">  
window.adtriba = window.adtriba || [];  
window.adtriba.push(["conversion", "Transaction", {  
id: {{ order_number }},  
revenue: {{ total_price | money_without_currency }},  
currency: {{ currency }}  
}]);  
</script>

When customers reach the last page of the checkout, the code that's delivered to the browser looks like this:

<script type="text/javascript">  
window.adtriba = window.adtriba || [];  
window.adtriba.push(["conversion", "Transaction", {  
id: "ABCDE123456",  
revenue: "49.99",  
currency: "EUR"  
}]);  
</script>

Source: Shopify Help Center

Did this answer your question?