/Documentation

How to set up Shopify app

Updated Sep 25, 2026

Before you begin

If you want to use functionalities such as the Custom Loader and Cookie Keeper power-ups, or Customer Match, you need to have an sGTM container hosted on Stape. You will also need GA4 or Data tags configured in a web GTM. If you don’t have this, follow the Get started with sGTM hosting instructions.

How to set up the app

  1. Log in to your Shopify account.
  2. Go to Apps and search for the Stape Conversion Tracking app.
  3. Click Install.
Install

General

  1. Open the app and configure the General tab:
  • Use Shopify Markets (Beta) – check the box if you have multiple Shopify markets. Using the feature, you can configure GTM injection separately for each Shopify market. If the feature is disabled, all markets use the default setup.
  • Insert GTM snippet – automatically adds the snippet with JavaScript code to every page on your website. 
  • Enter the WEB Google Tag Manager ID – specify the Web container ID.
  • Add custom domain – specify the custom domain (optional). In this case requests go through your tagging subdomain, so cookies stay first-party.
  • Add custom loader – specify Stape container identifier (optional). The gtm.js script loads from your domain instead of Google’s, which helps the script get past ad blockers. Custom Loader needs to be turned on in your Stape account to use it.
  • Select whether to use the Cookie Keeper. Cookie Keeper needs to be enabled in your Stape account to use it. 

2. Click Save.

General

Data Layer

  1. Configure the Data Layer tab:
  • Add ecommerce Data Layer events – add standard data layer events to your shop.
  • Append '_stape' to event dataLayer – adds _stape to event names so they don’t clash with existing dataLayer pushes, potentially triggering your tags twice. When it’s unchecked, event names are pushed as per GA4 schema.
  • Enable checkout error tracking – enable dataLayer events that signify checkout errors to make debugging easier.
  • Product collection limit – set the limit for products included in view_collection event.
  • Advanced Data Layer Settings – allows you to customize how product parameters (item_id, item_sku, item_brand, and item_category) are sent to match your ad catalog keys. This allows you to add a Prefix, combine Data points, or change the default Sources.

2. Click Save.

Data layer

3. Activate the Data Layer.

3.1. Activate the Add ecommerce Data Layer events checkbox and configure additional settings.

3.2. Save changes.

3.3. Copy the code for the custom pixel in the box below on the data layer tab and follow the instructions to add and activate it.

In the Customer privacy section, under Permission spoiler, please make sure to select Not required. The code snippet only generates the Data Layer; it doesn't set any cookies or report any data to third parties.

In the Data Layer tab of the app, there is also an option Log events to console (Dev), which is a debugging option for developers and store admins. When enabled, it logs eCommerce events in the browser console, shows event payloads sent to the GTM/Stape server container for verification, and helps debug Data Layers.

This option is for development only and should be disabled in production to avoid unnecessary console logging.

Webhooks

  1. Configure the Webhooks tab. Webhooks are useful for events outside the website (for example, phone or offline sales).
  • Enable Send webhooks to sGTM container.
  • Add your GTM server container URL.
  • Choose the webhooks:
    • Purchase webhook – send a purchase event when a new order is created.
    • Refund webhook – send a refund event when an order is refunded. 

2. Click Save.

i

Note:

Shopify webhooks don’t include cookie data, which is essential for accurate platform tracking. We recommend using them as a secondary option, primarily in cases where standard online tracking is not feasible, such as for offline or phone sales.

Webhooks

Customer Match

  1. If you’re using Google Ads, configure Customer Match:
  • Container API Key – specify your Stape container API key.
  • Google Ads Operating customer ID – specify your operating customer ID.
  • Google Ads customer ID – specify your customer ID.
  • Select which User data to share.
    • Consent – select whether to inherit the consent from email marketing, or set it manually.
    • Backfill – if checked, the app scans your existing database and retroactively syncs all past contacts, leads, or customers who already match your configured trigger criteria/statuses into the Google Ads Customer Match list.

2. Click Save.

Customer match

Testing

Debugging a GTM download

After activation or any changes, it is recommended to check if your container is actually uploaded to the site.

To do this, go to any page on your site, open your browser console, and in the network tab, filter by your subdomain/tagging server URL. You should see a request like in the following screenshot with a response status 200:

"Network" tab in browser console

Debugging data layer checkout events

With events that happen before the checkout page, everything works like on any other platform - you can launch a preview of your GTM web container and find all the events you do:

Events in the web GTM Preview mode

The checkout events won't be displayed in GTM Preview due to the isolated environment on these pages that blocks unrestricted DOM manipulation or script injection, including the GTM snippet.

But you can manually insert the snippet on the checkout page using the Stape GTM Helper Chrome extension:

  • After running Preview Mode in GTM, turn on the toggle Shopify Sandbox dataLayer in the Settings tab of the extension.
  • In the tab Inject GTM, click Enable injection, add your domain name, and GTM ID. Save changes.
Inserting the snippet on the checkout page manually

Now, the events on the checkout page will display in GTM Preview.

Checkout page events in the web GTM Preview mode

Was this article helpful?

Comments

Can’t find what you are looking for?