Step 4. Configure Stape server GTM app for Shopify
Updated Mar 27, 2025
- Install Stape Server GTM App in store.

2. In the Generate tab are all the settings related to installing the GTM snippet on all pages of your Shopify shop.

- GTM web container id
Here you need to specify your GTM WEB container ID.
- Custom domain
It is extremely important to use your own subdomain for first party cookies to work correctly and for tracking to work in general. If you do not already have a subdomain added to your sGTM container, you can use this guide to add it.
- Custom Loader
An optional parameter, but its use is highly recommended to increase protection against ad blockers. Specify here your Stape container identifier. Follow this guide to find Stape container identifier.
- Cookie Keeper
You can learn more about Cookie Keeper power-up on this page. This allows you to minimize the impact of the latest ITP restrictions. Before activating this feature, make sure you have it enabled in Stape, in your container.
- GTM snippet block
Here you can take the GTM snippet to install it on pages that are outside of your Shopify theme (such as pages made by third-party apps like Zipify).
3. In the Data Layer tab you can find the data layer events to activate and configure.

Here you can find a complete list of events and their payload which is added via the Stape app.
Data layer activation:
- Activate the 'Add ecommerce Data Layer events' checkbox.
- Save changes.
- Copy the code for custom pixel in the box below on data layer tab and follow the instructions to add and activate it.
In Customer privacy section, under Permission spoiler, please make sure to select ‘Not required’. The code snippet only generates dataLayer, it does not set any cookies or report any data to third-party.
4. Webhook events are configured in the Webhook tab.
Note: the problem with webhooks on Shopify is that they don't contain any cookie data which is crucial for tracking any platform, so using webhook events is only recommended as a last resort if you for some reason can't track it online.
This tab is where the webhook events are configured.

To activate a webhook you need to activate the checkbox, specify the url of the server GTM container and /path where the webhooks should be sent.
You can subscribe to webhooks when a new order is created or when a refund is made on an order.
Here are some useful blog posts we have about using and debugging webhooks: