{"id":10128,"date":"2026-09-20T08:31:00","date_gmt":"2026-09-20T06:31:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=10128"},"modified":"2026-09-09T13:23:04","modified_gmt":"2026-09-09T11:23:04","slug":"tutorial-implementing-the-tiktok-events-api-for-online-shops","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/","title":{"rendered":"Tutorial: Implementing the TikTok Events API for Online Shops"},"content":{"rendered":"<p>A TikTok pixel on its own reports fewer purchases than a shop actually processes. Ad blockers, tracking protection in the browser, and visitors who close the tab before the confirmation page finishes rendering all remove events that did happen. Sending the same purchases a second time from the server closes that gap \u2014 and creates a new problem, because TikTok now receives two reports of one purchase.<\/p>\n<p>The mechanism that resolves it is a shared <code>event_id<\/code>: one value generated per purchase and sent unchanged along both paths. The following walkthrough builds that architecture end to end for a shop \u2014 the browser event, the identifiers the server cannot see by itself, the server request, and the verification that deduplication is actually working.<\/p>\n<figure class=\"lw-diagram\">\n<img decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/tiktok-events-api-en.png\" width=\"1120\" height=\"580\" loading=\"lazy\" alt=\"Two-lane flow: one event_id generated per purchase, sent by the browser TikTok pixel and by the server Events API, merging in Events Manager where the matching id makes the purchase count once\"><figcaption>The pixel supplies the browser context, the server supplies the reliability &ndash; the shared event_id keeps them one conversion.<\/figcaption><\/figure>\n<h2>Step 1: Generating the Event ID Once<\/h2>\n<p>The <code>event_id<\/code> has to be generated in one place and reused, which rules out generating it independently on each side \u2014 two random values describe two separate conversions as far as TikTok is concerned. For a shop, the order identifier is the natural source: it already exists at the moment of purchase, it is stable, and it is available to both the confirmation page and the backend.<\/p>\n<p>A prefix keeps event types apart, since a single order can produce more than one tracked event. An <code>event_id<\/code> of <code>purchase-10432<\/code> for the purchase and <code>checkout-10432<\/code> for the checkout start keeps each pair matched to its own counterpart. As a side effect, a visitor refreshing the confirmation page produces the same <code>event_id<\/code> again and is deduplicated rather than counted twice.<\/p>\n<h2>Step 2: The Browser Event<\/h2>\n<p>In the TikTok pixel, the identifier travels in the third argument of <code>ttq.track<\/code>, separate from the event properties:<\/p>\n<pre class=\"wp-block-kevinbatdorf-code-block-pro\"><code>ttq.track('CompletePayment', {\n  contents: [\n    { content_id: 'SKU-8891', content_type: 'product', quantity: 1, price: 149.00 }\n  ],\n  value: 149.00,\n  currency: 'PLN'\n}, {\n  event_id: 'purchase-10432'\n});<\/code><\/pre>\n<p>The event name must match on both sides as well. TikTok pairs the two reports on the combination of event name and <code>event_id<\/code>, so <code>CompletePayment<\/code> in the browser and <code>Purchase<\/code> on the server are two different events that will never deduplicate against each other, no matter how carefully the identifier is matched.<\/p>\n<h2>Step 3: Capturing the Identifiers the Server Cannot See<\/h2>\n<p>Two values exist only in the browser. <code>ttclid<\/code> arrives as a URL parameter when a visitor lands from a TikTok ad, and <code>_ttp<\/code> is the first-party cookie the pixel sets. Both improve attribution on the server request, and both have to be persisted at landing time \u2014 the confirmation page is usually several navigations later, by which time the URL parameter is long gone:<\/p>\n<pre class=\"wp-block-kevinbatdorf-code-block-pro\"><code>\/\/ On landing: persist the click id for the rest of the visit\nconst ttclid = new URLSearchParams(window.location.search).get('ttclid');\nif (ttclid) {\n  document.cookie = 'shop_ttclid=' + encodeURIComponent(ttclid) +\n                    ';max-age=2592000;path=\/;secure;samesite=Lax';\n}<\/code><\/pre>\n<p>At checkout, both values are read out of the cookies and stored on the order record, so the backend has them when it builds the server event. The visitor&#8217;s IP address and user agent come from the original HTTP request and belong in the same record \u2014 a request sent later from a server has neither of its own.<\/p>\n<h2>Step 4: The Server Request<\/h2>\n<p>The Events API takes a POST to the <code>event\/track\/<\/code> endpoint of the TikTok Business API, authenticated with an access token from TikTok Events Manager and addressed to a pixel through <code>event_source_id<\/code>. Identifying fields are normalised and then SHA-256 hashed; nothing identifying leaves in plain text:<\/p>\n<pre class=\"wp-block-kevinbatdorf-code-block-pro\"><code>{\n  \"event_source\": \"web\",\n  \"event_source_id\": \"PIXEL_CODE\",\n  \"data\": [{\n    \"event\": \"CompletePayment\",\n    \"event_time\": 1789000000,\n    \"event_id\": \"purchase-10432\",\n    \"user\": {\n      \"email\": \"1f3a...\",\n      \"phone\": \"9c22...\",\n      \"external_id\": \"7b41...\",\n      \"ttclid\": \"E.C.P.xxxxx\",\n      \"ttp\": \"2ABCDe...\",\n      \"ip\": \"203.0.113.7\",\n      \"user_agent\": \"Mozilla\/5.0 ...\"\n    },\n    \"properties\": {\n      \"contents\": [\n        { \"content_id\": \"SKU-8891\", \"content_type\": \"product\", \"quantity\": 1, \"price\": 149.00 }\n      ],\n      \"currency\": \"PLN\",\n      \"value\": 149.00\n    },\n    \"page\": { \"url\": \"https:\/\/shop.example.com\/thank-you\" }\n  }]\n}<\/code><\/pre>\n<p>Normalisation before hashing decides whether the identifiers match anything: email trimmed and lowercased, phone reduced to digits in international E.164 form. The same value hashed from <code>Anna@Example.com&nbsp;<\/code> and from <code>anna@example.com<\/code> produces two unrelated digests, and only one of them can match. <code>event_time<\/code> is a Unix timestamp in seconds, and the request belongs immediately after order confirmation rather than in a nightly batch. TikTok rejects events that arrive too late, and a batch job discovers that only once the window has already closed.<\/p>\n<h2>Step 5: Verifying That Deduplication Works<\/h2>\n<p>The <code>test_event_code<\/code> field, taken from the Test Events tab in Events Manager, routes a request into the test view without touching reporting \u2014 enough to confirm that the payload is accepted and that the hashed fields are recognised.<\/p>\n<p>Deduplication itself only shows up in live data. In Events Manager, an event receiving both channels reports its browser and server counts separately, and the difference between their sum and the deduplicated total is the evidence that pairing is working. A total that equals the sum of both channels means nothing is being matched \u2014 usually a mismatched event name, or an <code>event_id<\/code> generated separately on each side. Comparing the deduplicated count against actual orders in the shop backend is the check that matters; TikTok&#8217;s own numbers cannot reveal a purchase that neither channel reported.<\/p>\n<h2>Staying Inside the Guardrails<\/h2>\n<p>Both channels belong behind the same advertising-consent signal. A server-side request is not exempt from consent because it originates in a backend: it carries the same customer data, and the lawful basis for sending it is the one collected in the browser. That means the consent state has to be stored with the order and checked before the request is built. Raw email addresses and phone numbers exist only long enough to be normalised and hashed, and the access token belongs in a secrets store rather than in application code, since it authorises writing conversions into the ad account.<\/p>\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/business-api.tiktok.com\/portal\/docs\" target=\"_blank\" rel=\"noopener noreferrer\">TikTok Business API documentation<\/a><\/li>\n<li><a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc9110.html\" target=\"_blank\" rel=\"noopener noreferrer\">RFC 9110: HTTP Semantics<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/verifying-googlebot\" target=\"_blank\" rel=\"noopener noreferrer\">Google Search Central: verifying crawlers<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A dual-channel TikTok tracking architecture for e-commerce: the browser pixel and the server-side Events API sending the same purchase, tied together by a shared event_id so the conversion is counted once rather than twice.<\/p>\n","protected":false},"author":1,"featured_media":13833,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[127],"tags":[91261,91386,91285,91516,91219],"class_list":["post-10128","post","type-post","status-publish","format-standard","hentry","category-tutorials-en-digital-marketing","tag-conversion-tracking","tag-marketing-cyfrowy-pl","tag-first-party-data","tag-tracking","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tutorial: Implementing the TikTok Events API for Online Shops - Lukas Wojcik - Blog<\/title>\n<meta name=\"description\" content=\"Dual-channel TikTok tracking: the browser pixel and the server-side Events API sending the same purchase, tied by event_id so it counts once.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial: Implementing the TikTok Events API for Online Shops - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"Dual-channel TikTok tracking: the browser pixel and the server-side Events API sending the same purchase, tied by event_id so it counts once.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-20T06:31:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Tutorial: Implementing the TikTok Events API for Online Shops\",\"datePublished\":\"2026-09-20T06:31:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/\"},\"wordCount\":850,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png\",\"keywords\":[\"Conversion Tracking\",\"Digital Marketing\",\"First-Party Data\",\"Tracking\",\"Tutorial\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/\",\"name\":\"Tutorial: Implementing the TikTok Events API for Online Shops - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png\",\"datePublished\":\"2026-09-20T06:31:00+00:00\",\"description\":\"Dual-channel TikTok tracking: the browser pixel and the server-side Events API sending the same purchase, tied by event_id so it counts once.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png\",\"width\":1200,\"height\":630,\"caption\":\"Tutorial: Implementing the TikTok Events API for Online Shops\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/tutorials-en-digital-marketing\\\/tutorial-implementing-the-tiktok-events-api-for-online-shops\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial: Implementing the TikTok Events API for Online Shops\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tutorial: Implementing the TikTok Events API for Online Shops - Lukas Wojcik - Blog","description":"Dual-channel TikTok tracking: the browser pixel and the server-side Events API sending the same purchase, tied by event_id so it counts once.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/","og_locale":"en_US","og_type":"article","og_title":"Tutorial: Implementing the TikTok Events API for Online Shops - Lukas Wojcik - Blog","og_description":"Dual-channel TikTok tracking: the browser pixel and the server-side Events API sending the same purchase, tied by event_id so it counts once.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-20T06:31:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Tutorial: Implementing the TikTok Events API for Online Shops","datePublished":"2026-09-20T06:31:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/"},"wordCount":850,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png","keywords":["Conversion Tracking","Digital Marketing","First-Party Data","Tracking","Tutorial"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/","name":"Tutorial: Implementing the TikTok Events API for Online Shops - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png","datePublished":"2026-09-20T06:31:00+00:00","description":"Dual-channel TikTok tracking: the browser pixel and the server-side Events API sending the same purchase, tied by event_id so it counts once.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10128-tutorial-implementing-the-tiktok-eve-g.png","width":1200,"height":630,"caption":"Tutorial: Implementing the TikTok Events API for Online Shops"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/tutorials-en-digital-marketing\/tutorial-implementing-the-tiktok-events-api-for-online-shops\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Tutorial: Implementing the TikTok Events API for Online Shops"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=10128"}],"version-history":[{"count":3,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10128\/revisions"}],"predecessor-version":[{"id":17284,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10128\/revisions\/17284"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/13833"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=10128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=10128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=10128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}