Shopify - How to set the measurement code?
How to set the measurement code?
The measurement code is used so that you can monitor the performance of your ads, get detailed statistics and use other features to improve your results. Below you will find a simple guide on how to set up a tracking code on your online store.
💡 Note: Before installing the Tanganica Pixel tracking code, make sure you have it set up correctly on the website cookie banner.
Inserting the Tanganica Pixel measurement code on the online store
- Sign in to the Shopify admin.
- In the lower left corner, click Settings.

- Go to the Customer Events section and click the Add Custom Pixel button.

- Name the pixel "Tanganica Pixel" and then click Add Pixel.

- Remove all gray comments in the code section.
- Copy the following code and paste it into the code field:
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-TRS5RSN');
analytics.subscribe("checkout_completed", event => {
window.dataLayer.push({
event: "checkout_completed",
order_id: event.data.checkout.order.id,
price: event.data.checkout.totalPrice.amount,
currency: event.data.checkout.currencyCode,
items: event.data.checkout.lineItems,
})
});
- Save the changes using the Save button and then click Connect.

❗ Don't forget to test if the meter code is set correctly in the Tanganica app. ❗
What to do if the application cannot find the measurement code?
- Make sure you correctly copy and paste the code into the Customer Events section and save the changes.
- Make sure you connected your Pixel in the last step.
- Make sure your online store website is fully functional.
If you still don't know what to do, contact our support - we'll be happy to help! 🚀