/Documentation

Magento 2 extension overview

Updated Sep 25, 2026

The Stape Conversion Tracking extension adds a web Google Tag Manager (GTM) snippet to your Magento 2 site and pushes data layer events and webhooks to a server GTM (sGTM) container. You can use it on its own or together with another plugin that already injects GTM. Sending the conversion data from the server, rather than only from the browser, can help with client-side tracking limits such as ad blockers or Safari ITP cookie expiration.

Stape's extension for Magento 2 is free, and you can use it without creating a Stape account. You will need a Stape account if you want to use the following functionalities:

Magento app

How it works

  1. The extension injects the GTM snippet in your store pages. You can load that snippet from your own domain in two ways, and it requires a container hosted on Stape.
  • Same-origin (recommended) – you can configure the same-origin domain together with Custom Loader that helps the script get past ad blockers, and cookie lifetimes stay intact. In this case the Cookie Keeper power-up isn’t needed.
  • Custom Loader and Cookie Keeper power-ups – use this if same-origin isn’t feasible or not wanted (for example, proxying on the web server adds CPU overhead). Load GTM from a tagging subdomain (for example sgtm.example.com) with the Custom Loader power-up so ad blockers are less likely to block the script, and Cookie Keeper so Safari ITP doesn’t expire cookies such as _ga and _fbp early.

If you don’t have a container on Stape, the snippet will be loaded from Google’s default CDN.

2. When site visitors view items, add to cart, or check out, the extension pushes standard GA4 ecommerce events and user data into dataLayer. 

3. Tags in the web GTM container (GA4 or Stape Data Tag) pick up those data layer events and send them to your sGTM container on Stape.

4. The sGTM container receives the events (through the GA4 Client or Data Client). Server tags then turn the data into requests for your analytics or marketing platform (GA4, Meta CAPI, TikTok, Google Ads, Snapchat, and others).

5. For actions that happen in the Magento 2 backend (for example, an order completed in admin), Magento can send a webhook straight to the sGTM container. The payload includes transaction data and user identifiers. The conversion can still be recorded if the site visitor had already left; the redirect to thank-you page didn't occur on some payment gateways, or the purchase happened offline.

6. The sGTM container sends the events to the analytics or marketing platforms you use.

Was this article helpful?

Comments

Can’t find what you are looking for?