How TikTok tracking works
Knowledge

How TikTok tracking works

The background on PixelRelay's TikTok connection. To set it up, see Connect TikTok.

Browser and server

PixelRelay sends each event from our servers through TikTok's Events API, so ad blockers can't stop it. It also runs a TikTok pixel on your storefront from the PixelRelay Pixel app embed. Both copies of an event carry the same event ID, so TikTok can tell they're the same event.

  • Purchases come from our servers only, since PixelRelay's tag can't run on Shopify's thank-you page.
  • Want server-only? Set TikTok to PixelRelay — server-side only under Settings → Relay → Who tracks each network?
  • On the shared-pixel fallback, PixelRelay doesn't add its own TikTok tag and only sends for shoppers whose TikTok browser tracking is blocked.

What gets sent

What happenedTikTok event
Product viewedViewContent
Cart viewedViewContent
Added to cartAddToCart
Checkout startedInitiateCheckout
Payment info addedAddPaymentInfo
SearchSearch
Order placedPurchase
Recharge subscription order or renewalPurchase

Recharge events need Recharge connected. You choose whether renewals go to TikTok under Renewal destinations.

Matching shoppers

To match an event to a TikTok user, PixelRelay sends what it has:

  • TikTok's click ID (ttclid) when the shopper came from a TikTok ad, and TikTok's _ttp cookie.
  • The shopper's IP address and browser.
  • Hashed email and phone, plus a hashed PixelRelay visitor ID. These are left out when the shopper's consent doesn't allow ad data.

Hashed means scrambled one way before it leaves our servers. TikTok compares it with its own hashed copy.

Duplicates

TikTok only merges two copies of an event when they share an event ID. PixelRelay's browser and server copies do. Anything else sending to the same pixel (TikTok's Shopify app on the same pixel, a GTM tag, a custom pixel, theme code, another app) uses its own IDs, so TikTok counts both.

That's why PixelRelay should have its own pixel, or you use the Standard fallback. See TikTok's Shopify app and Turn off old TikTok tracking.

Timing

PixelRelay sends events as they happen. TikTok Events Manager can take a while to show them. Check the date range includes today, and that you're looking at the pixel PixelRelay uses.

TikTok accepting an event doesn't mean it's attributed to an ad. That part is up to TikTok.

Troubleshooting

What you seeWhat to do
TikTok shows roughly twice the events you'd expectTwo senders on one pixel. Give PixelRelay its own pixel, or go back through Turn off old TikTok tracking.
Test mode on the TikTok Pixel cardEdit, tick Clear the saved test event code and resume production TikTok events, Save.
Pixel ID is required or Access Token is requiredBoth are needed the first time. When editing, leave Access Token blank to keep the saved one.
An event failed in Reports → Event logOpen it to see TikTok's error message.
Nothing in TikTok Events ManagerCheck Reports → Event log first. If TikTok accepted the events, check you're on the right pixel and the date range includes today.
Purchases only show as server eventsExpected. PixelRelay's tag can't run on Shopify's thank-you page.

Your token

PixelRelay stores the access token encrypted and never shows it again. To change it, go to Connections → TikTok Pixel → Edit and paste a new one.

Questions

Do I have to remove TikTok's Shopify app? No. Keep it for your catalog and ads. Just give PixelRelay its own pixel, or set the app to Standard for the shared-pixel fallback.

Can I go back to my old setup? Yes. See Switch back.

Need help? Email [email protected]