TikTok click-to-conversion attribution starts with two identifiers: ttclid (the click ID appended to landing URLs) and _ttp (TikTok’s browser identifier cookie). Together, they help TikTok connect an ad click with downstream conversion actions such as AddToCart, InitiateCheckout, and Purchase. Preserving both identifiers is a critical prerequisite to optimize TikTok Event Match Quality scores.

The core challenge is that browser-only TikTok ttclid cookie tracking is highly fragile. A visitor may click an ad, navigate multiple pages, leave, return later, and authenticate with an external payment gateway. If the click ID is lost before Purchase is triggered, TikTok receives a valid conversion event but loses the direct connection to the original paid ad click.

How `ttclid` and `_ttp` bridge the journey

A TikTok ad landing URL can include a parameter such as:

```text

https://shop.example.com/product/sku-123?ttclid=E.C.P...

```

On that first request, the store should read $_GET[‘ttclid’] immediately before redirects, canonical-URL cleanup, or application routing removes it. The _ttp value is read from the visitor’s TikTok first-party cookie when available. These values serve different purposes:

  • ttclid identifies the paid-click context supplied in the landing URL.
  • _ttp is a browser-level identifier that improves continuity between web pixel and Events API activity.

For server-side TikTok Events API tracking, persist both values and attach them to subsequent event payloads (including user.ttclid and user.ttp) according to the current TikTok Events API schema. Ensure these stored identifiers remain available when the customer adds an item, begins checkout, or completes an order—not only on the initial landing-page hit.

Why client-only tracking loses click IDs

Client-side JavaScript depends on browser storage surviving the entire buying journey, but that mechanism fails across four common scenarios:

  1. Safari ITP: Intelligent Tracking Prevention can shorten script-set cookie lifetimes to seven days or—in stricter privacy scenarios—as little as 24 hours, restricting cross-site storage behavior.
  2. External payment journeys: Redirection through PayPal, Stripe 3DS challenges, or bank gateways frequently strips referrers and query parameters, returning users to a session without ttclid.
  3. Incognito and storage clearing: Private browsing modes, automated browser cleanup, and blocked cookies erase JavaScript-accessible identifiers between visits.
  4. Multi-page checkout: A pixel reading only the active URL cannot recover the original click ID once the shopper navigates beyond the initial landing page.

This is why simply firing a browser Purchase pixel is insufficient for longer consideration cycles: the event payload fires, but its click-level attribution signal has already decayed.

Server-side persistence on PrestaShop

Pixel Track TikTok for PrestaShop 1.7, 8.0, 8.1, and 8.2 captures ttclid at the initial landing request and stores it in the PrestaShop session context using HTTP-only cookies. Because HTTP-only cookies cannot be accessed by client-side JavaScript, they protect sensitive tracking parameters while ensuring they remain accessible to the server for subsequent requests.

The module also captures _ttp where available and attaches these stored identifiers to downstream Events API payloads for AddToCart, InitiateCheckout, and Purchase events. This server-side continuity is critical during off-site payment redirects: the server retrieves the stored attribution context upon return, even if the browser strips the original URL parameter.

Do not treat server-side persistence as a way to bypass user consent: store and transmit tracking identifiers only when permitted by your consent management setup. For details on normalizing the customer data that accompanies these click IDs, review the guide on SHA-256 hashed customer parameters.

Implementation checklist

  • Capture and validate $_GET[‘ttclid’] on the initial landing request before application routing or redirects strip the parameter.
  • Persist the value server-side using a secure, first-party HTTP-only cookie or PrestaShop session context.
  • Extract the _ttp browser identifier whenever consent configuration and browser storage permit.
  • Attach stored values to server-side payloads as user.ttclid and user.ttp across all downstream Events API events.
  • Test the complete conversion journey—from ad landing and multi-page browsing through external payment redirects to the final Purchase event in TikTok Events Manager.
  • Monitor Event Match Quality (EMQ) to verify that server-side continuity recovers lost attribution signals over time.