Skip to content
🚀 Find us on Product Hunt

TikTok Pixel Tracking Setup for WordPress

Quick answer: Use the free container builder wizard to select TikTok Pixel and your events, enter your tracking ID, then import the generated file into Google Tag Manager - no manual tag setup needed for any of the 21 events below.

TikTok Pixel base code and standard events, generated as Custom HTML. This platform does not have a native GTM tag type, so the container wraps its base code in a Custom HTML tag.

Build my TikTok Pixel container →

Events you can track

conversion events

engagement events

By Humayun Kabir Naim — Last updated: 9 November 2026

Quick answer

To track a WordPress site in TikTok through Google Tag Manager, first check whether TikTok is already being sent to — because TikTok's official WordPress plugin installs the Pixel and the Events API by itself, with automatic deduplication. If that plugin is active and healthy, the correct GTM setup is no TikTok tags at all. If you want TikTok inside GTM — one container feeding GA4, Meta, Google Ads and TikTok from the same form signals — deactivate the plugin first, then build: a base pixel tag on every page (it captures the ttclid click ID into the _ttp cookie), a Lead event tag fired only on proven form success (thank-you page, success message, or the form plugin's success event — the same generate_lead push your GA4 setup uses), CompleteRegistration on completed sign-ups, Schedule on completed bookings, and Contact on WhatsApp, phone and email clicks. Put one event_id, generated once at the moment of submission, in the Lead tag's dedicated Event ID field — not in its parameters — so a server copy sent later through the Events API deduplicates against the browser copy instead of doubling the lead.

Official TikTok plugin settings for WordPress with Pixel and Events API connected

What gets tracked

A non-shop WordPress site has no cart and no checkout, so TikTok's ecommerce events have nothing to attach to. What it has is enquiries — and TikTok's lead-type events map onto them directly:

WordPress actionCapture it byTikTok event
Any page viewedBase pixel tagPageview
Contact / quote form submitted successfullyThank-you page, success message, or plugin success eventLead
Contact Form 7 form submitted successfullywpcf7mailsent listener pushLead
Any form submitted successfully (generic setup)Shared generate_lead pushLead
User registration / sign-up completedRegistration success page or success eventCompleteRegistration
Booking / appointment completedBooking confirmation page or tool eventSchedule
Phone number clickedClick trigger on the tel: linkContact
WhatsApp button clickedClick trigger on the wa.me linkContact
Email address clickedClick trigger on the mailto: linkContact
A key service or landing page viewedPage View trigger on those paths (optional)ViewContent

Two name facts run through this table. In May 2025 TikTok renamed SubmitForm to Lead (and CompletePayment to Purchase). The old name still fires and is converted automatically in reporting — but deduplication keys on the event name, so a browser Lead and a server SubmitForm for the same submission will not merge. New builds use Lead; estates with an old sender still emitting SubmitForm have a standing mismatch to fix (see Troubleshooting). And the mirror-image warning: there is no Purchase here. If WooCommerce is later installed underneath, purchases move to the WooCommerce + TikTok hub — do not fire ecommerce events from a site with no checkout in the meantime.

Clicks get the same discipline as on the Meta hub: a WhatsApp tap is intent, so it is Contact, never Lead — the moment clicks count as leads, TikTok optimises for clickers and your cost per lead becomes fiction.

Deep dives: Form Submission, CF7 Form Submission, Lead, Sign Up, Calendly Booking. Running GA4 too? The form signals below are the same ones it uses: WordPress + GA4. See all options on the WordPress hub.

Before you start

  1. Choose who sends TikTok — before touching any setting. Option A (keep the official plugin): the TikTok for Business plugin stays as the only TikTok sender, Pixel + Events API with its automatic deduplication; GTM gets no TikTok tags. Option B (replace with GTM): deactivate the plugin, and GTM sends everything. Both are legitimate; the accidental third option — plugin active and GTM firing — is not, because the two senders' event IDs never match (see the deduplication section). TikTok also offers to install tags into your GTM container from Events Manager's own GTM setup flow; that is still Option B (GTM sending) and does not change the rule.
  2. Check for the plugin and the other quiet senders. Look for the TikTok plugin under Plugins, all-in-one pixel plugins with TikTok enabled, and a ttq snippet pasted into the theme or a header/footer plugin.
  3. A TikTok pixel and its ID — the same one in every sender. In TikTok Ads Manager: Tools → Events → Web Events. If the plugin created its own pixel and your GTM work points at a different one, Events Manager will look broken while both setups "work".
  4. GTM installed on the site, once, and forms that expose a success signal (Option B). Each form needs a thank-you page redirect, a visible success message, or a plugin success event (Contact Form 7, WPForms and Gravity Forms all provide one). If your GA4 form tracking already works, these signals already exist in GTM.

Route 1: Use the free TagManagerBuilder container

Open the GTM Container Builder, choose WordPress, then TikTok Pixel, and tick the events you want. Enter your Pixel ID, download the JSON, then in GTM go to Admin → Import Container and choose Merge → Overwrite conflicting tags, triggers, and variables. This container is the Option B build — so if you chose Option A, do not import it: the plugin is already your sender. If a GA4 container from this site is already in the workspace, import into the same workspace so the containers share the form triggers and variables. Test with the testing section below before publishing.

Route 2: Build it manually in GTM

Step 1 — Settle the sender (Option B only)

Deactivate the TikTok plugin, and remove or disable TikTok inside any all-in-one pixel plugin or theme snippet. Do this before the GTM tags go live: overlap is only forgiven when both senders share an event_id, and the plugin generates its own IDs internally — they are not yours to match, so every day of overlap is a day of doubled leads and pageviews.

Step 2 — The base pixel tag

Tags → New, choose the TikTok Pixel template from the Community Template Gallery (or a Custom HTML tag with the base code), enter your Pixel ID, and set the trigger to All Pages. This tag loads the pixel and sends Pageview on every page — and, just as importantly, it reads the ttclid click ID from TikTok ad landing URLs and stores it in the first-party _ttp cookie. That cookie is what later browser and server events use to attach the lead to the click, and it is TikTok's fallback matching key when a server event arrives without an event_id. A base tag missing from landing pages, or loaded late, loses click IDs no later setting can recover.

TikTok Pixel base tag in GTM on the All Pages trigger for a WordPress site

Step 3 — The success push (shared with GA4 and Meta)

TikTok's Lead must fire on the same proven-success signal as every other platform on this site. Contact Form 7 fires a DOM event, wpcf7mailsent, only on a successful send; a small Custom HTML listener tag turns it into the same generate_lead push the WordPress × GA4 hub creates — with one extra field, the event_id TikTok deduplication will need:

document.addEventListener('wpcf7mailsent', function(event) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: 'generate_lead',
    form_id: 'cf7-' + event.detail.contactFormId,
    tiktok_event_id: 'lead_' + Date.now()
  });
}, false);

The ID is created once, at the submission, inside the push — that is what makes it available to the browser tag now and to a server copy later. If you already built the GA4/Meta listener, add the tiktok_event_id field to that push rather than running a second listener. WPForms and Gravity Forms offer their own success events, messages and redirects; Elementor Pro forms fire no front-end success event, so use their Redirect action after submit (thank-you page) or an Element Visibility trigger on the success message. If a form lives in an iframe (some booking and form embeds), your page's pixel cannot see inside it at all — the provider's redirect or their own integration is the route, not a cleverer trigger.

Custom HTML listener pushing generate_lead with a TikTok event ID on a Contact Form 7 success

Step 4 — The Lead tag (and where the event_id goes)

Create a tag of the TikTok Pixel template type (or a Custom HTML tag with a ttq.track() call) for the Lead event, on a Custom Event trigger matching generate_lead. Add a form_id condition if different forms need different handling, and pass the form's identity as a parameter if you want forms separable in Events Manager. The critical field is the Event ID: in the template it is a dedicated field — set it to the tiktok_event_id Data Layer Variable. In a ttq.track() call it is the third argument, outside the parameters object:

ttq.track('Lead', {
  content_name: 'contact-form-1'
}, { event_id: 'lead_1728123456789' });

A Lead tag that buries the ID inside the parameters has sent no deduplication key at all — the event arrives, looks complete, and can never merge with its server copy.

TikTok Lead tag in GTM with the event ID in the dedicated Event ID field

Step 5 — CompleteRegistration, Schedule and Contact

Same pattern, three more tags. CompleteRegistration fires at the end of the registration flow — success page or the registration plugin's success signal, never the sign-up button. Schedule fires on a completed booking: a redirect to a confirmation page on your site is the reliable route; if the booking tool does not redirect, use its confirmation message with an Element Visibility trigger. Contact is one tag on three Click triggers — Click URL starts with tel:, contains wa.me, starts with mailto: — with a distinguishing parameter (whatsapp, phone, email) so the three stay separable. Enable GTM's click variables (Variables → Configure) if Click URL is unavailable.

Click trigger for WhatsApp links in GTM for the TikTok Contact event

Step 6 (optional) — A server copy for leads, via the Events API

The browser pixel loses leads to blockers and dropped connections, and on a lead site each lost lead is a lost optimisation signal. A server GTM container (or another Events API route) can send a server copy of the Lead — worthwhile once lead volume justifies the hosting and maintenance. The contract is strict and short: the server copy must carry the same event name (Lead, not SubmitForm), the same pixel, and the event_id from the Step 3 push — which is why the ID is generated in the push and not inside the browser tag. IDs generated independently per path never match. The full server-side build lives in the Server-Side Tracking guide.

Deduplication — TikTok's rules, applied to leads

TikTok deduplicates on a three-part key: pixel ID + event name + event_id must all be identical. Timing decides the outcome: copies arriving within about 5 minutes merge (one event, parameters combined); copies arriving later, up to 48 hours, are deduplicated — the first copy wins. The same rule rescues same-channel repeats: a second browser copy with a matching event_id is also dropped, which Meta never does. And if a server event arrives with no event_id at all, TikTok falls back to matching on the _ttp cookie — better than nothing, and no basis for a design.

For leads, the practical consequences are two. First, the forgiving rules only apply around an ID you control: the official plugin's internal IDs are not the lead_… ID in your push, so plugin + GTM leads never match — the one-sender decision in "Before you start" is not caution, it is arithmetic. Second, names are part of the key: standardise every sender on Lead today, because a legacy SubmitForm sender quietly disables deduplication for exactly the events you most want counted once.

Duplicate Lead events from the plugin and GTM in TikTok Test Events

Test it: GTM Preview, Pixel Helper and Test Events

GTM Preview showing the TikTok Lead tag fired on a successful form submission
  1. Click Preview in GTM and open the site in Tag Assistant. Submit each form once with test details — including one deliberately invalid submission, which must produce no Lead.
  2. In the Preview timeline, click generate_lead and confirm the Lead tag sits under Tags Fired, with the event_id populated from the push.
  3. Install the TikTok Pixel Helper Chrome extension and repeat the flow on the live site. It shows each event as the pixel sent it — name, parameters, warnings — and is the fastest way to catch a misplaced Event ID.
  4. In TikTok Events Manager, open your pixel's Test Events, browse the site with the test code active, and repeat a submission. The Lead should arrive within seconds, once. If you send a server copy too, it should show merged with the browser copy, not as a second event.
  5. Run the name check: if any sender still emits SubmitForm, confirm what it reports as — and then rename it properly, because mixed names are a standing deduplication risk.
  6. Only when the flow is clean end to end, click Submit in GTM to publish. Watch the pixel's event counts for the first days: Lead volume should track your real enquiry count, not double it.
TikTok Pixel Helper showing Pageview and Lead on a WordPress site Lead received once in TikTok Test Events from browser and server

WordPress-specific troubleshooting

Lead counts are far higher than actual enquiries. The Lead tag is firing on the submit click or GTM's Form Submission trigger — both fire before validation. Move it to a success signal and re-test with an invalid submission: it should produce nothing.

Every event appears twice. Two senders: the official plugin still active alongside GTM is the classic cause, and deduplication cannot rescue it because the plugin's event IDs are not yours. Search your page source for ttq — it should load only through GTM (Option B) or only through the plugin (Option A).

An old integration sends SubmitForm while GTM sends Lead. The rename mismatch: both fire, neither deduplicates against a server copy, and reporting blends two names for one action. Find the old sender (a legacy snippet, an all-in-one pixel plugin, an old container version) and rename or remove it.

Elementor forms produce no Lead. Elementor has no front-end success event for GTM to hear. Use the form's Redirect action to a thank-you page, or an Element Visibility trigger on the success message. If the form is embedded from another service in an iframe, neither works — use that service's own confirmation redirect or integration.

Events fire in Preview but never appear in Events Manager. Check the Pixel ID first — one wrong character sends everything to a pixel nobody watches. Then confirm the base tag fired on the same page view; an event tag without a working base tag sends nothing. Finally, test with ad blockers off: a blocked pixel looks exactly like a broken tag.

Leads arrive, but attribution is weak. Check the click ID chain: land on the site from a TikTok link (or a URL carrying ttclid) and confirm the _ttp cookie is set on the first page. If the base tag loads late, is consent-blocked, or is missing from landing pages, the cookie is never written. Advanced Matching — hashed email and phone, sent with consent — is the other lever; it raises match quality rather than fixing broken events.

Next steps once this is clean: WordPress + Meta and WordPress + Google Ads reading the same generate_lead push, then Consent Mode v2 so consent choices reach every tag correctly.

Frequently asked questions

Should I use the official TikTok plugin or GTM on WordPress?

One or the other — never both for the same events. The official plugin is a complete sender on plain WordPress: Pixel plus Events API with automatic deduplication, installed in one click. Choose GTM when you want one container feeding GA4, Meta, Google Ads and TikTok from the same form signals, events the plugin does not send, or deduplication keys you control. Running both doubles your leads, because the plugin's event IDs are generated internally and never match your GTM event IDs.

Should my form event be called Lead or SubmitForm?

Lead. TikTok renamed SubmitForm to Lead in May 2025, and new builds should use the current name. The old name still fires and is converted automatically in reporting — but deduplication keys on the event name, so a browser Lead and a server SubmitForm for the same submission will not merge. If an older integration still sends SubmitForm, rename it.

My site has no shop. Do I need AddToCart or Purchase?

No. Those events describe a cart and a checkout that do not exist on a plain WordPress site, and firing them on substitutes (a form, a button) teaches TikTok a funnel that is not real. Build the lead set — Lead, CompleteRegistration, Schedule, Contact. If you add WooCommerce later, ecommerce events move to the WooCommerce + TikTok setup.

Where exactly does the event_id go in the TikTok tag?

In the tag's dedicated Event ID field in the TikTok Pixel template — or, in a ttq.track() call, in the third argument, as { event_id: '…' } — never inside the event parameters object. An ID placed in the parameters is sent as ordinary data and ignored by deduplication, so the browser and server copies of the same lead are both kept.

Do I need the Events API for a lead-generation site?

Not on day one. The browser pixel plus a clean Lead is a complete start. Add the server copy when lead volume is high enough that blocker losses visibly distort optimisation — and generate the event_id at submission from the start, as this guide does, so adding the Events API later is a wiring job rather than a rebuild.

My Lead fires even when the form fails validation. Why?

Because the tag is triggered by an attempt signal — the submit click or GTM's built-in Form Submission trigger — and both fire before the form plugin validates anything. Fire Lead on a success signal instead: the thank-you page, the visible success message, or the plugin's success event such as Contact Form 7's wpcf7mailsent. Test with a deliberately invalid submission; it should produce no Lead.

Share with