AdobeCommerce - 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.
Inserting the Tanganica Pixel measurement code on the online store
- Sign in to the Adobe Commerce admin.
- Go to Content in the left menu and select Configuration in the Design section.
- Find your active online store and click Edit.
//picture
- Click on the HTML Head section located on the page below in Other Settings.
//picture
- In the Scripts and Style Sheets field, paste the following tracking code:
<!-- Tanganica pixel --><script>(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');</script><!-- End Tanganica pixel -->
- At the top, save the changes with Save Configuration.
- Then go to System → Cache Management in the left menu and click on Flush Magento Cache
//picture
❗ 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 put the code correctly in the Scripts and Style Sheets section of the admin.
- Empty the cache in System → Cache Management and reload the page.
- Verify that you have saved all changes.
- Check the code for syntax errors or illegal characters.
- Make sure your online store website is fully functional.
If you still don't know what to do, you can proceed as follows video tutorial, or contact our support - we will be happy to help you! 🚀