Skip to main content
Paid Social Tracking · 2 min read

Setting Up TikTok Events API & LinkedIn Conversions API in Server-Side GTM

Extend your first-party Server-Side GTM container beyond Meta and Google by deploying deduplicated TikTok Events API and LinkedIn Conversions API tags.

Syed Yasir

Syed Yasir

Conversion Tracking & Server-Side Attribution Expert

Server-Side GTM fanning out deduplicated conversion events to TikTok Events API and LinkedIn Conversions API

Once you have a clean first-party Server-Side Tracking container running on Stape or Google Cloud, you shouldn’t limit its benefits to GA4 and Meta. Adding TikTok Events API (for e-commerce and DTC scale) and LinkedIn Conversions API (for B2B lead generation) takes only a fraction of the original setup effort because your dataLayer and server event stream are already in place.

Setting Up TikTok Events API in sGTM

Just like Meta CAPI, TikTok recommends running the TikTok Pixel + Server-Side Events API together with deterministic deduplication:

  1. Capture ttclid and _ttp: Persist TikTok’s click ID (ttclid) and browser cookie (_ttp) on landing and forward them to your sGTM container.
  2. Share event_id: Pass the identical event_id in both your Web GTM TikTok Pixel tag and your GA4/Data stream to sGTM.
  3. Configure the Official TikTok Events API Tag in sGTM: Map Pixel ID, Access Token, event_id, hashed email/phone (SHA-256), ttclid, ttp, value, currency, and contents.
  4. Verify in TikTok Events Manager: Use your TESTXXXXX code in sGTM to confirm events arrive and deduplicate cleanly.

Setting Up LinkedIn Conversions API (CAPI) in sGTM

For B2B advertisers, browser-only LinkedIn Insight Tags struggle with multi-week enterprise sales cycles and strict corporate browsers. LinkedIn Ads Conversion Tracking via CAPI bridges both online leads and offline CRM milestones:

  1. Capture li_fat_id: Store LinkedIn’s first-party ad click ID (li_fat_id) on landing alongside your form submissions.
  2. Authenticate the LinkedIn CAPI Tag in sGTM: Use Stape’s or LinkedIn’s official sGTM template with your LinkedIn Ads Account ID and Conversion Rule URN.
  3. Pass Strong B2B Match Keys: Include SHA-256 hashed work email, first/last name, company name, country code, and li_fat_id (strictly when advertising consent is granted).
  4. Pair With CRM Offline Sync: Send SQL and Closed-Won stages from HubSpot or Salesforce to LinkedIn CAPI so campaigns optimize toward real B2B pipeline.
{
  "conversion": "urn:lla:llaPartnerConversion:1234567",
  "conversionHappenedAt": 1733151600000,
  "eventId": "lead_hubspot_44102",
  "user": {
    "userIds": [
      { "idType": "SHA256_EMAIL", "idValue": "b4c9a289323b21a01c3e940f150eb9b8..." },
      { "idType": "LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID", "idValue": "example-li-fat-id" }
    ]
  }
}

Always gate both TikTok Events API and LinkedIn CAPI inside sGTM on ad_storage === 'granted' and ad_user_data === 'granted' so your multi-channel setup stays compliant across the UK, EEA, and US.

Explore our TikTok Ads Conversion Tracking and LinkedIn Ads Conversion Tracking services to expand your server-side stack cleanly.

Topics: TikTok Events API LinkedIn CAPI sGTM Stape
Share this article

Free Tracking Audit

Want Me to Audit Your Conversion Tracking Stack?

Book a free tracking audit. I'll review your GTM, GA4, Server-Side Tracking, Meta CAPI, Google Ads Enhanced Conversions, and Consent Mode V2 setup and highlight exactly what to fix.

Keep Reading

All articles →
Syed Yasir Chat on WhatsApp Available now · Replies under 5 min