---
title: "TikTok Pixel not firing after cookie consent on Shopify"
description: "The TikTok Pixel is on your Shopify store but sends nothing after visitors accept cookies. Check the banner, Shopify's Customer Privacy API and the pixel setup."
updated: "2026-10-23"
url: "https://ispixelworking.com/guides/tiktok.not_firing_after_consent/shopify"
---

# TikTok Pixel not firing after cookie consent on Shopify

Fix guide · Shopify · medium · about 30 min · updated 2026-10-23

For the finding “TikTok Pixel does not fire after consent” (`tiktok.not_firing_after_consent`).
Also for: [Any website](https://ispixelworking.com/guides/tiktok.not_firing_after_consent/generic), [WordPress](https://ispixelworking.com/guides/tiktok.not_firing_after_consent/wordpress), [Webflow](https://ispixelworking.com/guides/tiktok.not_firing_after_consent/webflow), [Framer](https://ispixelworking.com/guides/tiktok.not_firing_after_consent/framer).

## What this means

The TikTok Pixel is on your Shopify store, but after cookies were accepted, no events were sent to TikTok. As far as TikTok can tell, this page has no visitors.

Why it costs you money:

- TikTok cannot see page views or conversions from this page, so campaigns optimize without data and reported results are too low.
- Audiences built from store visitors stop growing.

How sure we are: if our checker found and accepted your cookie banner, this is reported as **critical**. If we did not find a banner we could operate, it is reported as **high**: the pixel may be waiting for a banner we did not recognize. Test it yourself before changing anything.

On Shopify, the banner records the visitor's choice through Shopify's **Customer Privacy API**, and Shopify then starts the pixels under **Settings > Customer events** that have the permissions they need. For app pixels, Shopify documents that it replays the events that already happened on the page, so a page view should arrive right after "Accept", without a reload. TikTok's Shopify help does not say whether the pixel of the **TikTok** app (the sales channel) runs this way, so look for it under **Customer events** (step 3 below). If the pixel sits in theme code behind TikTok's consent mode, something on the page has to call `ttq.grantConsent()`. If nothing arrives, a link in one of these chains is broken.

## How to confirm it yourself

Our check runs from a browser in the EU. Shopify shows its banner based on where the visitor is (with automated settings, in the EEA and the UK), so if you are elsewhere, use a VPN with a European location or ask a colleague in the EU.

1. Open your store in a **private (incognito) window**, open developer tools (F12), go to the **Network** tab and type `analytics.tiktok.com/api` into the filter box.
2. Load the page and click **Accept** on the cookie banner.
3. Wait about 5 seconds. You should see at least one request to `analytics.tiktok.com/api/v2/pixel` whose payload has `"event": "Pageview"`. If nothing appears, the pixel does not fire after consent.
4. Open the **Console** tab and run `Shopify.customerPrivacy.currentVisitorConsent()`. After "Accept", `marketing` should be `"yes"`. If it is empty or `"no"`, the banner did not pass the choice to Shopify. If the console reports that `Shopify.customerPrivacy` is undefined, nothing on the page has loaded the Customer Privacy API, which usually means the banner is not connected to it.
5. Still in the Console, an error such as `ttq.holdConsent is not a function` or `ttq.grantConsent is not a function` points at theme code that uses TikTok's consent commands without declaring them (step 7 below).
6. Click to another page. If events only appear now, the pixel starts one page too late, and you lose the first page of every new visit (often the ad landing page).

The **TikTok Pixel Helper** extension, **Test Events** in TikTok Events Manager and TikTok's `pixel_debug` cookie work as described in the [general guide](https://ispixelworking.com/guides/tiktok.not_firing_after_consent/generic). For custom pixels, Shopify's **Pixel Helper** (click **Test** on the pixel under **Settings > Customer events**) also shows whether the pixel is still waiting for consent.

## How to fix

1. **Check that the banner records the choice.** After clicking "Accept", reload: the banner should not come back. If two banners appear (Shopify's and a consent app's), keep one and turn the other off.
2. **If you use a consent app,** check its settings or documentation for its integration with Shopify's Customer Privacy API. Shopify's pixels learn about consent only through that API. Without the integration, they keep waiting in regions where Shopify requires consent.
3. **Check that "Accept" grants what the pixel needs.** Under **Settings > Customer events**, look for TikTok among the app pixels; if it is there, open the **More options** menu next to it and choose **View customer privacy**. For a custom pixel, open it and check the **Customer privacy** section. A pixel only runs when the visitor has given every permission it requires; if it requires one your banner never grants (for example **Preferences**), it never starts. The console check above shows what was granted.
4. **Check that the pixel is connected.**
   - **TikTok app:** open **Sales channels > TikTok** and check that a data sharing level (Standard, Enhanced or Maximum) is chosen and a pixel is created or selected. TikTok's setup asks for both. If you reinstalled the app and want to keep an old pixel, TikTok says to disconnect that pixel in your TikTok for Business account first, then go through the setup again.
   - **Custom pixel:** it must be connected; if it shows a **Connect** button, it is not.
5. **Check the custom pixel code.** Shopify's sandbox runs JavaScript only, so remove `<script>`, `<noscript>` and any other HTML from TikTok's base code. Remove `ttq.holdConsent()` as well, unless the same code also calls `ttq.grantConsent()`: in a custom pixel, Shopify's **Permission** setting already handles consent, and a pixel on hold only queues its events. If the code throws an error, the Pixel Helper shows a red dot for that event.
6. **If GTM sends the TikTok tags:**
   - **GTM as a custom pixel:** Shopify notes that Google Tag Assistant does not detect tags inside a custom pixel, so test with the Network tab instead. The custom pixel's permissions (step 3) decide when GTM can run.
   - **GTM in `theme.liquid`:** the TikTok tags often have only a page view trigger, which runs once, before the visitor clicks "Accept". Add a trigger for the data layer event your consent setup pushes when consent is given (GTM **Preview** shows its name), keep the tags' consent requirement, and make sure they cannot fire twice on the same page. TikTok's base code tag must fire before its event tags.
7. **If the pixel is in theme code behind TikTok's consent mode** (a developer task):
   - `"holdConsent"`, `"revokeConsent"` and `"grantConsent"` must be in the `ttq.methods` list inside the base code. TikTok's standard snippet does not include them; without them, `ttq.holdConsent()` throws an error before `ttq.load()` runs.
   - `ttq.grantConsent()` must run when consent is given on the current page (Shopify's Customer Privacy API publishes a `visitorConsentCollected` event when consent changes) and on every page load for visitors who accepted earlier (check `Shopify.customerPrivacy.marketingAllowed()` after loading the API). The Shopify guide for [TikTok Pixel fires before cookie consent](https://ispixelworking.com/guides/tiktok.fires_before_consent/shopify) has a code example.
   - The simpler fix is to remove the code from the theme and use one pixel under **Customer events**: the TikTok app's pixel, if it passes the test above, or a custom pixel.
8. **Check the pixel ID and the console.** Compare `context.pixel.code` in the request payload with the pixel connected in the TikTok app or shown in Events Manager. Look for JavaScript errors from TikTok's library or your own code, then save your changes and publish GTM if you changed it.

## Common causes

- A consent app is not integrated with Shopify's Customer Privacy API, so Shopify never learns that the visitor accepted.
- Two banners are active, and the visitor answers the one Shopify does not listen to.
- The pixel requires a permission that the banner's "Accept" does not grant.
- A custom pixel contains HTML tags, a code error or `ttq.holdConsent()` without `ttq.grantConsent()`, or is disconnected.
- Theme code calls `ttq.holdConsent()` without adding the consent methods to `ttq.methods`, or calls `ttq.grantConsent()` only in a click handler.
- A GTM TikTok tag fires only on the initial page view, before consent, and never again on that page.

## How to verify the fix

1. In a fresh private window with a European location: no `analytics.tiktok.com/api/v2/pixel` requests before "Accept", a page view request within a few seconds after "Accept" on the same page, and `currentVisitorConsent()` shows `marketing: "yes"`.
2. Reload the page: the page view is sent on load, without clicking anything.
3. In TikTok Events Manager, **Test Events** shows the events quickly; the pixel's **Overview** updates later, because data is not shown in real time.
4. Re-run the check on IsPixelWorking. The issue should be gone, and "TikTok Pixel fires before cookie consent" should not appear in its place.

## Sources

- Shopify.dev, About web pixels (in consent regions, app pixel callbacks run after consent and earlier events are replayed; custom pixels run in a sandbox): https://shopify.dev/docs/apps/build/marketing/pixels
- Shopify.dev, Customer Privacy API (`currentVisitorConsent`, `marketingAllowed`, `visitorConsentCollected`): https://shopify.dev/docs/api/customer-privacy
- Shopify.dev, Pixel privacy (a pixel loads only with every permission it declares as required): https://shopify.dev/docs/api/web-pixels-api/pixel-privacy
- Shopify Help Center, App pixels (**View customer privacy**; only apps that use the Web Pixels API are listed): https://help.shopify.com/en/manual/promoting-marketing/pixels/app-pixels
- Shopify Help Center, Manage your custom pixels: https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/manage
- Shopify Help Center, Create custom pixel code (JavaScript only): https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/code
- Shopify Help Center, Testing custom pixels (Pixel Helper, awaiting consent): https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/testing
- Shopify Help Center, Create a Google Tag Manager custom pixel (Tag Assistant limitation): https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/gtm-tutorial
- Shopify Help Center, Configuring customer privacy settings: https://help.shopify.com/en/manual/privacy-and-security/privacy/customer-privacy-settings/privacy-settings
- TikTok Business Help Center, Shopify Set-Up Guide (data sharing level, create or select a pixel): https://ads.tiktok.com/resources/help/article/shopify-set-up-guide?lang=en
- TikTok Business Help Center, Disconnect the Integration (reusing a previous pixel): https://ads.tiktok.com/resources/help/article/disconnect-integration?lang=en
- TikTok API for Business, Pixel Cookie consent mode (`ttq.methods`, `holdConsent` before `ttq.load`, queued events sent on `grantConsent`, every page): https://business-api.tiktok.com/portal/docs?id=1795929012554754
- TikTok API for Business, Install Pixel using code (base code, `pixel_debug` cookie): https://business-api.tiktok.com/portal/docs?id=1739585702922241
- TikTok Business Help Center, Events Manager: monitor and diagnose (Overview, data not in real time, Test Events): https://ads.tiktok.com/resources/help/article/tiktok-events-manager-monitor-and-diagnose?lang=en
- Google Tag Manager Help, Tag Manager consent mode support: https://support.google.com/tagmanager/answer/10718549
