All Collections
ADTRIBA CORE
Set up ADTRIBA CORE
Implement Adtribas Conversion Tracking in Shopify
Implement Adtribas Conversion Tracking in Shopify

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

János Moldvay avatar
Written by János Moldvay
Updated over a week ago

If your shop is running on a Shopify webshop the implementation of Adtribas basic tracking can be integrated via a Tagmanagement system.

Nevertheless for the conversion tracking on the order success page we would recommend to follow this article of Shopify.

Tracking pixels

You can add tracking pixels to your order status page using the Additional scripts box.

Tracking orders

Conversion tracking codes, such as a tracking pixel, can be added to your store to track customers purchasing from your store. Tracking codes are typically used on the order status page.

Tracking scripts are provided by a third-party, and are used as a snippet of code in your Shopify admin.

Steps:

  1. After you have your tracking code (find it on Adtribas Console in Project Settings), copy it to your clipboard with cmd + c on a Mac or ctrl + c on a PC.

  1. From your Shopify admin, go to Settings > Checkout.

  1. Under Order processing, go to the Additional scripts text box.

  2. Paste your tracking code from your clipboard with cmd + v on a Mac or ctrl + v on a PC.

Tip

Customers might return to the order status page multiple times. This can skew your conversion analytics. You might want to run scripts on the first visit only.

Conditional integration

Some providers require you to show their tracking pixels only if the customer comes with a certain reference parameter (usually ref, source, or r).

Shopify stores these values with the orders and makes them available using landing_site_ref.

For example, your affiliate provider wants you to include their pixel in the checkout, but only for customers that come through their referrals. The URL that you register with your tracking system would look like this:

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

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

It's used on the last page of checkout to verify that a given order came from someone referred by your affiliate.

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>


Because of the if landing_site_ref == 'tracking-site' statement, the pixel will only be displayed to customers with the correct landing_site_ref.

Examples

Based on that code, you need the following Liquid tags:

  • The total price of the order: {{ total_price | money_without_currency }}

  • A unique order ID. order_number prints out the name of the order such as #2322 without the hash character: {{ order_number }}

  • The order's currency. You can either hardcode this or use {{ currency }}

Replace the placeholders in the tracking code with actual 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>

Enjoy working with us? Please consider leaving a review.

Did this answer your question?