Skip to content

Server-side events · Setup reference

TikTok Events API (Official) tag template for server GTM: events, fields and dedup rules

TikTok's official server-container template 'TikTok Events API (Official)' converts GA4 events claimed by your tagging server into TikTok events and POSTs them to the Events API. It hashes email, phone and external_id, and picks up ttclid from the URL or cookie and _ttp from the cookie. TikTok's Events Manager setup flow configures an event_id variable for Pixel/Events API dedup; manual installs must add one themselves.

Read from the official documentation on 9 November 2026. Sources are listed at the end.

Endpoint and authentication

POST https://business-api.tiktok.com/open_api/v1.3/event/track/

Tag fields Pixel ID and Access Token; sent as the Access-Token header

Standard event names

Spelled exactly as Server-side GTM + TikTok expects them. A near miss is treated as a different event.

EventUse it for
Pageviewfrom GA4 page_view
ViewContentfrom GA4 view_item
Searchfrom GA4 search
AddToWishlistfrom GA4 add_to_wishlist
AddToCartfrom GA4 add_to_cart
InitiateCheckoutfrom GA4 begin_checkout
AddPaymentInfofrom GA4 add_payment_info
CompletePaymentfrom GA4 purchase
CompleteRegistrationfrom GA4 sign_up

Required and recommended fields

FieldWhat it needs
pixel_code (Pixel ID)tag field; sent as event_source_id
access_token (Access Token)tag field; Access-Token header
eventGA4 event name mapped as above; unmapped names pass through unchanged, or override with the Event Name field
event_idDe-duplication Configurations > Event ID field, or the GA4 event's event_id parameter
PrerequisitesGA4, a GCP account with billing for the tagging server, web + server containers, Publish/Approve/Edit/Read permissions. The template works only in a Server container.

Match keys and hashing

KeyNormalise and hash
emailTemplate lowercases, trims and SHA-256 hashes unless already a 64-character hex hash. Source: tag field, or user_data.email_address / sha256_email_address.
phoneTemplate lowercases, trims and SHA-256 hashes (no digit normalisation). Source: user_data.phone_number / sha256_phone_number.
external_idTemplate trims and SHA-256 hashes (case preserved). Falls back to tt_external_id or user_id.
ip / user_agentnot hashed; from ip_override and user_agent on the event

Click ids

Click idWhere it comes from
ttclidRead from ?ttclid= on page_location (or a same-host referrer), then the ttclid cookie. The template re-sets a first-party ttclid cookie for 30 days.
_ttpRead from the _ttp cookie and sent as user.ttp

Deduplication

Time limits and batch sizes

How to test before you trust it

Why events arrive but don't attribute

Sources

Platforms change these rules without notice. If a source says something different from this page, the source wins.

Other platforms

All platforms