Magento 2 tracking using Google Tag Manager (not recommended. Its recommended to use our Extension)

Created by Mikkel Rosener, Modified on Mon, 26 Feb 2024 at 09:44 AM by Mikkel Rosener

1. Connect Magento2 integration during the onboarding flow in Reaktion. Use your Magento 2 API key. 

Make sure to give us needed permissions. See this guide (Step 5):


LINK: Installing Magento2 extension




2. Insert our tracking script into your Google Tag Manager. 


The script is available here and unique per store:


LINK: https://advertiser.reaktion.com/setup/tracking-settings/google-tag-manager page insert this script on all pages of their store


See this guide to inserting the script into Google Tag Manager:


LINK: Add our tracking script to Google Tag Manager (GTM) - Shopify



3. Adjust and insert this script on the "Order thank you" page:

Adjust the script below to replace MAGENTO2_ORDER_ID placeholder with Magento2 order's entity_id value; and then place it on order status page: 



<script type="application/javascript"> window.reaktionStoreOrderId = 'MAGENTO2_ORDER_ID'; </script>



It's possible that you already have Magento2 order's entity_id value exposed in GTM. Its also possible that you have other Magento2 order's identifiers there - it's important to use entity_id and not increment_id or other identifiers.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article