Skip to content
GrowthTag Solutions logoGrowthTag

Analytics & Tracking case study

TikTok Pixel & Events API Setup Using GTM & Stape

Server-side tracking for a UAE mobile-accessories store: 47 conversions at 106.98 AED each in 30 days, with purchases tracked at a 90+ Event Match Quality score.

Client
Defensiv-X
Industry
E-commerce (mobile accessories)
Location
United Arab Emirates
Category
Analytics & Tracking
47
Conversions in 30 days
106.98 AED each
90+
Purchase Event Match Quality
out of 100 · “You're doing well”
7
Funnel events
page view through purchase
4
Platforms fed
TikTok · Meta · GA4 · Snap

Context

Why server-side tracking matters for your business

Your TikTok ads are only as smart as the data they learn from. TikTok's algorithm decides who sees your ads by studying who buys. When a purchase never reaches TikTok, it can't credit the ad that drove the sale, and it can't learn from that buyer to find more people like them. You still pay for the ad either way.

  • Events still arrive from the server

    Ad blockers, iOS and Safari limits can block or cut short the browser pixel. The TikTok Events API sends each event from a server as well, where those limits can't reach.

  • Buyers matched with hashed customer data

    Instead of browser cookies that expire and get cleared, every purchase carries a hashed email, phone number and customer ID, so TikTok can recognise the buyer: 90+ out of 100 on purchases in this account.

  • Counted once, learning from every sale

    Both copies share an event ID, so TikTok merges them into one. Nothing is lost and nothing is double-counted, so reporting and ROAS come much closer to what actually happened.

Method

How the setup works

  1. 1

    Captured once

    GTM picks up each shopper action on the site: product views, add to cart, checkout and purchase.

  2. 2

    Sent two ways

    The browser pixel (Stape template) sends it directly. Stape's server container sends it again through the Events API, with hashed email, phone and customer ID.

  3. 3

    Counted once

    Both copies share an event ID, so TikTok Events Manager merges them into one. The same server event also feeds Meta CAPI, GA4 and Snap CAPI.

Proof

Inside the setup, and what TikTok receives

Google Tag Manager, web container: TikTok tags built with Stape's template, alongside the GA4 tags that feed the server
Google Tag Manager, web container: TikTok tags built with Stape's template, alongside the GA4 tags that feed the server
Server-side GTM preview on Stape: one purchase event firing four server tags (TikTok Events API, Meta CAPI, GA4, Snap CAPI), all Succeeded
Server-side GTM preview on Stape: one purchase event firing four server tags (TikTok Events API, Meta CAPI, GA4, Snap CAPI), all Succeeded
TikTok Events Manager, test events (Oct 1, 2026): browser and server events, and one Purchase payload (customer identifiers and order ID blurred)
TikTok Events Manager, test events (Oct 1, 2026): browser and server events, and one Purchase payload (customer identifiers and order ID blurred)
TikTok Events Manager, event funnel statistics, Oct 1–3, 2026: events from browser, server, and both
TikTok Events Manager, event funnel statistics, Oct 1–3, 2026: events from browser, server, and both
TikTok Events Manager: Event Match Quality for the Purchase event, 90 out of 100, rated “You're doing well”
TikTok Events Manager: Event Match Quality for the Purchase event, 90 out of 100, rated “You're doing well”
TikTok Events Manager: all events with match quality, status and volume (Oct 1–3, 2026)
TikTok Events Manager: all events with match quality, status and volume (Oct 1–3, 2026)

Case study · Defensiv-X

Defensiv-X: TikTok Events API with a 90+ Purchase Match Quality

Location
United Arab Emirates
Campaign / setup
GTM · Stape · TikTok Events API
Period shown
Sep 22 – Oct 21, 2026
Conversions
47
in 30 days
Cost per conversion
106.98 AED
active sales campaign
Impressions
489,980
CPM 10.26 AED
Clicks
3,458
CTR 0.71%
TikTok Ads Manager, campaigns view, Sep 22 – Oct 21, 2026: 47 conversions at 106.98 AED each (roughly AED 5,030 spend)
TikTok Ads Manager, campaigns view, Sep 22 – Oct 21, 2026: 47 conversions at 106.98 AED each (roughly AED 5,030 spend)

The challenge

TikTok depended on the browser pixel to see conversions. Ad blockers, iOS privacy settings and browser limits stop part of those signals, so TikTok was optimizing the store's ads on an incomplete picture of its real sales.

What I did

  • Built a full TikTok Events API setup with Stape and Google Tag Manager.
  • A dedicated tag and trigger for every TikTok event: Page View on every page, View Content on product pages, then Add to Cart, Initiate Checkout and Purchase on their own e-commerce triggers.
  • Sent every key event from both the browser and the server, deduplicated by a shared event ID.
  • Passed complete order data on every purchase (value, currency, product ID, name and quantity) plus hashed email, phone number and customer ID.
  • Used the same server container to feed Meta CAPI, GA4 and Snap CAPI.

Result

Purchase Event Match Quality of 90+ out of 100, rated “You're doing well” by TikTok, and 47 conversions at 106.98 AED each from the active campaign. All 7 funnel events are active, every key event arrives from browser and server, and the client saw lower advertising costs after go-live and is very happy with the result.

Next step I recommended

TikTok recommends raising click ID coverage above 90% on the Purchase event for up to 5% more matched events. Tracking isn't a one-off job: I keep refining it as the platforms change.

Scope of work

  • TikTok Pixel Setup via Google Tag Manager
  • TikTok Events API (Server-Side) with Stape
  • Server-Side GTM Container Setup
  • Event Deduplication (Browser + Server)
  • Full E-commerce Event Tracking
  • Advanced Matching with Hashed Customer Data
  • Event Match Quality (EMQ) Optimization
  • Testing & Validation in TikTok Events Manager
  • Meta CAPI, GA4 & Snap CAPI from the Same Server

Tools and platforms

  • TikTok Events Manager
  • TikTok Pixel
  • TikTok Events API
  • Google Tag Manager
  • Server-side GTM
  • Stape
  • GA4
  • Meta Conversions API
  • Snap Conversions API
audit_requestedlead

Stop guessing. Start measuring what actually drives revenue.

Get a free audit of your tracking and ad accounts. You'll get a clear list of what's broken, what's missing and what to fix first — no obligation.