← All tracking problems

Google Tag Manager in Shopify

Tracking tag in Google Tag Manager not firing in Shopify

In Shopify you can set up Google Tag Manager as a custom pixel. According to Shopify such a pixel runs in an isolated environment, the sandbox. The pixels Tag Manager loads run inside it as well and have the same limits. An event from the store therefore first has to get into Tag Manager’s dataLayer, and some triggers find nothing to react to in the sandbox. Here you go through the most common causes in the order in which it often gets stuck. Enter your shop’s address below. You see usually within one to two minutes which pixels your shop loads. You can also check it yourself, the steps are further down. Enter address

How you notice

  • A tracking tag is set up in Tag Manager, but nothing of it arrives in GA4 or in your ad account.
  • The Shopify Pixel Helper shows a red dot or the note “Pixel is awaiting consent”.
  • Page views arrive, but clicks on links, forms or scrolling are missing.
  • After moving to the custom pixel, events are gone or count twice.

Only check websites you own or where the operator has allowed it. By starting the check you confirm this. What happens during the check?

Free, no account, usually within one to two minutes. We change nothing on your shop. We delete the result and the address after one hour. Privacy Policy

The check shows one page at one point in time. It does not see purchases or your ad account.

Common causes

The custom pixel is not connected

A custom pixel only measures once it is connected to your store. Checkable: under “Settings”, “Customer events” the pixel must show the status “Connected”. If it is listed among the disconnected pixels, click “Connect”.

The pixel does not pass events on to Tag Manager

Tag Manager reacts only to events in the dataLayer. According to Shopify your pixel has to subscribe to customer events and push them to the dataLayer, and at least one tracking tag with a trigger has to be set up in Tag Manager, otherwise no data is transferred. Checkable: in the pixel code there must be an analytics.subscribe for the event, for example for product_viewed.

The trigger does not match the event name

According to Shopify the trigger is a custom event, and its event name has to match the field event in the pixel. If the spelling differs, the trigger does not react. Checkable: compare the name in the trigger and the field event in the pixel code character by character.

A condition in the trigger does not apply

A tracking tag fires when a condition of its triggers is met. According to Google an exception trigger can block it as well. And the URL that arrives in the sandbox can contain information about the sandbox, according to Shopify. A URL condition may then not apply. Checkable: open the tracking tag and see whether an exception or a URL condition is set. Compare it with the URL in the event in the Shopify Pixel Helper.

The sandbox does not detect some events on its own

According to Shopify the sandbox cannot automatically detect outbound link clicks, scrolling, form data and clicks, and it cannot render elements such as buttons, forms or banners. If only such events are missing for you, that is probably why, not the tracking tag. Checkable: page view and product view arrive in the Pixel Helper, clicks and scrolling do not.

The pixel is waiting for consent

If your store requires consent in your region, pixels run according to Shopify only when the permissions set in the pixel are given. New pixels require marketing and analytics by default. If you use a cookie banner app, it has to report consent to Shopify. Checkable: when testing, the Shopify Pixel Helper then shows “Pixel is awaiting consent”.

What it can come down to in your shop

  • Shopify: you set up Google Tag Manager as a custom pixel under “Customer events”. Pixels it loads run in the same sandbox with the same limits, according to Shopify.
  • Shopify: events like page view or product view are passed on to the dataLayer by your pixel. Without this step Tag Manager does not see them.
  • Shopify: if your store requires consent in your region, the pixel runs only after consent. A cookie banner app has to report it to Shopify.

Check it yourself, step by step

  1. 01In Shopify open “Settings”, “Customer events” and check whether your custom pixel has the status “Connected”.
  2. 02Click the pixel and then “Test” to open the Shopify Pixel Helper. You can test only one custom pixel at a time. If it shows “Pixel is awaiting consent”, accept tracking in your store’s cookie banner.
  3. 03Open a new page and then a product. The Pixel Helper shows a dot per event: green means the event was subscribed to and the function ran through. Red means the function failed. You see the error message when you expand the event.
  4. 04Enlarge the Pixel Helper dialog and look at the event’s data. Compare the event name with the name in the trigger in Tag Manager.
  5. 05You can use the Google Tag Assistant as a page extension to see which Google tags load on the page. According to Shopify its “Troubleshoot tag” feature is not compatible with custom pixels and detects neither Google tags nor other pixels loaded by Tag Manager there. An empty result there does not mean nothing fires.

How to fix it

  • Connect the custom pixel under “Customer events” if it is not connected. Test code changes like this: save, close the Pixel Helper tab and open the Pixel Helper again. According to Shopify you cannot change the pixel while the Pixel Helper is running.
  • Subscribe in the pixel to the events you need and push them to the dataLayer with a name in the field event. In Tag Manager create a trigger of the custom event type with exactly that name and assign it to the tracking tag.
  • Give the event parameters of the tracking tag the names Google Analytics 4 expects. According to Shopify the dataLayer events are otherwise not processed. Each variable also needs its own dataLayer variable in Tag Manager.
  • For clicks, forms and other events the sandbox does not detect, publish your own events with Shopify.analytics.publish() and subscribe to them in the pixel. According to Shopify this replaces old dataLayer.push calls in theme.liquid. According to Shopify you get the right page URL from the page_viewed event.
  • Remove the old setup before you use the pixel: the container in theme.liquid and old pixel code. Otherwise events count twice according to Shopify.
  • Publish your changes in Tag Manager and then test again like a visitor, not as a logged-in store owner.

Trackneat is not affiliated with Shopify, Meta or Google. The names appear here only so it is clear what is meant.

Let it be checked automatically

The free check opens your store like a visitor and shows which pixels and tracking tags load there, also before consent and after “Reject”. What a single tracking tag in your container does and what is in your triggers you see in Tag Manager and in the Shopify Pixel Helper.

Trackneat writes to you as soon as this problem happens again. During the trial we check morning and evening (8 am and 8 pm). On a plan we check every 4 hours.

Start trial

14 days free

What else Trackneat checks

Common questions

Google Analytics not counting: GA4 collects no data

Tracking on the thank you page is missing: additional scripts no longer run