To run the TikTok pixel in Google Tag Manager, use TikTok’s official template, TikTok Pixel by TikTok; Snap’s equivalent is Snap Pixel by Snapchat. Fire the base pixel on every page, add one event tag per conversion on dataLayer triggers, and map GA4 event names to each platform’s names. Pass one shared event ID (TikTok’s Event ID, Snap’s Client Deduplication ID) and format phone numbers the way each platform expects before hashing.
- TikTok and Snap deduplicate within 48 hours, using different field names for the same idea.
- TikTok wants phone numbers in E.164 with the plus sign; Snap and Meta want digits only.
- TikTok’s template still lists CompletePayment; its current standard list says Purchase. Pick one name and use it on both legs.
- Snap has no lead event, so decide what a lead maps to.
Most TikTok pixel guides stop at "paste the base code on All Pages". The work that decides whether TikTok and Snap optimize well comes after: which event each action maps to, which field carries the dedup ID, and whether the hashed phone is in the format that platform can match. Both platforms are covered here because a team that runs one usually runs both.
Install both templates
TikTok Pixel
TikTok gives two routes, and its help says your container permissions must include Publish, Approve, Edit and Read. The recommended route runs from TikTok Events Manager, which installs the tags into your container for you. The manual route is the TikTok Pixel template by TikTok from the Community Template Gallery. Its fields cover the Pixel ID, an Event Name (a dropdown that also accepts a variable), advanced matching for email, phone and external ID, product properties that can be read from a GA4 ecommerce dataLayer, and an Event ID under De-duplication Configurations.
TikTok’s manual steps mention both the gallery template and pasting the base code into Custom HTML. Pick one. A template tag plus a Custom HTML base code loads the pixel twice and can double page events.
Snap Pixel
Snap’s template is Snap Pixel by Snapchat. One tag type covers the base event and conversions: you set the Pixel ID and an Event Type (PAGE_VIEW, VIEW_CONTENT, ADD_CART, START_CHECKOUT, ADD_BILLING, PURCHASE, SIGN_UP and others), plus fields for email and phone (raw or hashed), price, currency, item IDs, number of items, transaction ID and Client Deduplication ID. It also has an Enable Console Logging (Debug Mode) option for testing in Preview. For Snap’s own tools, see Snapchat Pixel setup.
Event mapping table
Name events once in the dataLayer, GA4 style, and map them here. This is a starting point; confirm each name against the platform’s current list and your server setup.
GA4 event to TikTok and Snap
| TikTok event | Snap event | Parameters to map | |
|---|---|---|---|
| page view | Base pixel page event | PAGE_VIEW | None beyond the base tag |
| view_item | ViewContent | VIEW_CONTENT | TikTok content_ids, value, currency; Snap item_ids, price, currency |
| add_to_cart | AddToCart | ADD_CART | Same as above, plus quantity or number of items |
| begin_checkout | InitiateCheckout | START_CHECKOUT | value or price, currency, item IDs |
| add_payment_info | AddPaymentInfo | ADD_BILLING | value or price, currency |
| purchase | Purchase | PURCHASE | value or price, currency, item IDs, transaction ID, event ID |
| generate_lead | SubmitForm | SIGN_UP or a custom event | event ID; a value if you assign one |
| sign_up | CompleteRegistration | SIGN_UP | event ID |
| search | Search | SEARCH | TikTok search_string; Snap search string |
Two choices need a written decision in your tracking plan. First, TikTok’s purchase name: its current standard events page lists Purchase, while the GTM template’s dropdown still offers CompletePayment and PlaceAnOrder. Second, Snap leads: with no lead event, teams send SIGN_UP or a custom event, sometimes PURCHASE when campaigns already optimize on it. Whatever you choose, the server must send the same name.
Dedup keys and phone formats
Same idea, different field names
| Browser field | Server field | Window | Phone before hashing | |
|---|---|---|---|---|
| Meta | eventID (Event ID in the template) | event_id | 48 hours, same event name | Digits with country code, no plus |
| TikTok | event_id (Event ID in the template) | event_id | 48 hours, identical event and event_id | E.164 with the plus sign |
| Snap | client_dedup_id (Client Deduplication ID) | event_id | 48 hours; purchases also match transaction_id to order_id for up to 30 days | Digits with country code; no plus, no leading 00 or 0 |
So a number written +971 50 123 4567 is hashed as 9715XXXXXXXX for Meta and Snap, and as +9715XXXXXXXX for TikTok (X marks the remaining digits). Hash the wrong form and the match silently fails. The cleanest fix is upstream: ask the developer to push both hashes into the dataLayer, for example sha256_phone and sha256_phone_e164, and let each tag read its own. Email is the same everywhere: trim, lowercase, then SHA-256.
TikTok keeps the first event it receives within the window. Snap matches the Pixel’s client_dedup_id to the server’s event_id and says the two values should be identical. Generate the ID once per event in the dataLayer push and map it to both templates.
Test before you publish
- GTM Preview. Walk the conversion path and confirm each TikTok and Snap tag fired once, on the right trigger, with the event ID and value filled.
- TikTok. The TikTok Pixel Helper Chrome extension shows what the pixel sent from the page. Then check the event in TikTok Events Manager, including its test events view.
- Snap. Turn on the template’s console logging in Preview to see the data each tag sends, then check the pixel’s activity in Snapchat Events Manager. Turn logging off afterwards.
- Server leg. Send one test event from the server with the same event ID and confirm both platforms show one event, not two.
Where this goes wrong
- Old and new Snap pixels on one page. In my experience, a Snap track call reaches every Snap pixel initialized on the page, so an old tag’s events land on the new pixel too. Audit for extra base tags before reading the new pixel’s numbers.
- Different names on browser and server. SIGN_UP in the browser and PURCHASE on the server will never deduplicate.
- Base pixel fires before identity is ready. If advanced matching values arrive with a page-data push, fire the base tags on that push, not on All Pages.
- One phone hash for everyone. TikTok’s match quality drops when it receives a hash of a number without the plus sign, and vice versa for Meta and Snap.
- Leads mapped by habit. Map leads to whatever your campaigns optimize on, then keep it stable; changing the event later resets learning.
Meta’s side of the same setup is in Meta Pixel in Google Tag Manager. The purchase push all three platforms read from is in GTM ecommerce tracking.
Do it faster with Whathead
With Whathead’s Google Tag Manager MCP, Claude can list every TikTok and Snap tag in a container with its event name, trigger and dedup field, find duplicate base tags, and add missing event tags in a workspace. Whathead is our product.
- “List every TikTok and Snap tag in GTM-XXXXXXX with the event it sends, its trigger, and which variable fills Event ID or Client Deduplication ID. Flag any page with two base tags for the same platform.”
- “Create TikTok Purchase and Snap PURCHASE tags on the purchase Custom Event, both reading {{DLV - event_id}} for dedup. Don’t publish.”
Before anything changes, Claude asks you to approve each GTM write. There is no dry-run preview for GTM, so the workspace is your draft and you test in Preview before publishing. For server events, Whathead’s server-side tracking sends TikTok Events API and Snapchat Conversions API events with the event ID, and is in private pilot.
TikTok pixel in Google Tag Manager: common questions
Can I install the TikTok pixel with Google Tag Manager?
Yes. Install it from TikTok Events Manager, or add the TikTok Pixel template by TikTok from the Community Template Gallery. TikTok’s help says you need Publish, Approve, Edit and Read permissions on the container.
Is there an official Snap Pixel template for GTM?
Yes. Snap Pixel by Snapchat is in the Community Template Gallery. It covers the base event and conversions, including a Client Deduplication ID field.
Which TikTok event should I use for purchases?
TikTok’s current standard events page lists Purchase. The GTM template still offers CompletePayment and PlaceAnOrder, so choose deliberately and send the same name from the server.
How do I test the TikTok pixel?
Use GTM Preview, then the TikTok Pixel Helper Chrome extension, then the event view in TikTok Events Manager.
Why is my TikTok or Snap match quality low?
Often the phone is hashed in the wrong format, or the pixel fires before email and phone are available. TikTok expects E.164 with a plus sign; Snap expects digits only.
Sources
- TikTok: Set up TikTok Pixel in Google Tag Manager, Standard events and parameters, Event deduplication, TikTok Pixel Helper, Events API parameters, TikTok Pixel GTM template. Checked 19 Nov 2026.
- Snap: Conversions API deduplication, Conversions API parameters, Snap Pixel GTM template. Checked 19 Nov 2026.
- Meta: Deduplicate Pixel and server events, Customer information parameters. Checked 19 Nov 2026.
Written by Ahmed Shahin, founder of Whathead. Last reviewed 19 November 2026.
Audit your TikTok and Snap tags from Claude
See every pixel tag, its trigger and its dedup field in one list, then fix gaps in a GTM workspace you review first.



