{"id":456,"date":"2026-09-10T09:00:00","date_gmt":"2026-09-10T07:00:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?p=456"},"modified":"2026-09-09T16:32:04","modified_gmt":"2026-09-09T14:32:04","slug":"first-party-cookie-enrichment-via-cloudflare-workers","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/","title":{"rendered":"First-Party Cookie Enrichment via Cloudflare Workers"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">Modern browser privacy mechanisms, specifically Apple Safari Intelligent Tracking Prevention (ITP) and Mozilla Firefox Enhanced Tracking Protection (ETP), impose strict expiration limits on client-side state persistence. Any HTTP cookie created via JavaScript using <code>document.cookie<\/code> is automatically capped at a maximum lifespan of 7 days\u2014or reduced to 24 hours if incoming traffic arrives from known advertising parameters or click-through domains. This limitation severely degrades multi-touch attribution, customer lifetime value (LTV) models, and return-visitor recognition in Google Analytics 4 (GA4). Deploying a First-Party Cookie Enrichment proxy via Cloudflare Workers running on the root domain edge infrastructure converts client-side identifiers into secure, server-set HTTP-only headers, extending cookie persistence up to two full years (730 days).<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">1. Architectural Mechanics of Safari ITP and Firefox ETP<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To bypass client-side expiration caps without violating first-party domain boundaries, tracking architectures must leverage HTTP response headers emitted from an authoritative first-party hostname. The restriction framework operates under three distinct rules:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Client-Side Cap (7 Days \/ 24 Hours):<\/strong> Cookies set via browser JavaScript scripts (such as GA4 <code>_ga<\/code> and <code>_ga_XXXXXXXXXX<\/code> cookies) are truncated by WebKit storage restrictions.<\/li>\r\n<li><strong>CNAME Cloaking Detection:<\/strong> Third-party tracking endpoints mapped via simple CNAME DNS records to subdomains are flagged by browser heuristics, triggering the same 7-day expiration penalty.<\/li>\r\n<li><strong>Same-Site Edge Exemption:<\/strong> Cookies issued via HTTP <code>Set-Cookie<\/code> headers from a server executing on the primary e-commerce hostname (e.g., via Cloudflare Workers routes like <code>www.example.com\/edge-cookie<\/code>) are classified as genuine server-side first-party storage and remain exempt from ITP storage restrictions.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"lw-diagram\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/cloudflare-worker-first-party-cookie-en.png\" width=\"1120\" height=\"640\" alt=\"Three layers from browser through the Cloudflare edge to the origin, showing the difference between a client-side and an edge-issued cookie\">\n<figcaption>The layer decides, not the domain: the same cookie name gets seven days from the browser and its full lifetime from the edge, because the Worker sets it in the HTTP response.<\/figcaption>\n<\/figure>\n\n<h2 class=\"wp-block-heading\">2. Step-by-Step Configuration of the Cloudflare Worker Edge Proxy<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Implementing an edge enrichment proxy requires deploying a serverless script that intercepts incoming browser requests, reads existing analytics IDs, and refreshes them via HTTP headers:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li><strong>Wrangler &amp; Worker Project Initialization:<\/strong> Initialize a new Worker script using Cloudflare Wrangler CLI or navigate to the Cloudflare Workers &amp; Pages dashboard to create an empty service.<\/li>\r\n<li><strong>Custom Route Assignment:<\/strong> Map the Worker to execute on a first-party subdirectory route on the primary production hostname (e.g., <code>https:\/\/www.example.com\/fp-cookie-enrichment*<\/code>).<\/li>\r\n<li><strong>Cookie Extraction &amp; Header Injection:<\/strong> Program the Worker to inspect incoming HTTP request headers for existing <code>_ga<\/code> and marketing identifiers, rewrite their expiration timestamps, and append a <code>Set-Cookie<\/code> header with <code>Secure<\/code>, <code>SameSite=Lax<\/code>, and a <code>Max-Age=63072000<\/code> (two years) directive.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Production-Ready TypeScript Worker Script<\/h3>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code class=\"language-typescript\">export default {\n  async fetch(request: Request): Promise&lt;Response&gt; {\n    const url = new URL(request.url);\n\n    \/\/ Only process requests directed to the designated enrichment endpoint\n    if (url.pathname !== '\/fp-cookie-enrichment') {\n      return fetch(request);\n    }\n\n    const cookieHeader = request.headers.get('Cookie') || '';\n    const gaCookieMatch = cookieHeader.match(\/(?:^|;\\s*)_ga=([^;]*)\/);\n    \n    \/\/ Fallback or extract the current GA4 client ID\n    const gaClientId = gaCookieMatch ? gaCookieMatch[1] : 'GA1.1.' + Math.floor(Math.random() * 1e9) + '.' + Math.floor(Date.now() \/ 1000);\n\n    const response = new Response(JSON.stringify({ status: 'enriched', clientId: gaClientId }), {\n      status: 200,\n      headers: {\n        'Content-Type': 'application\/json',\n        'Access-Control-Allow-Origin': 'https:\/\/' + url.hostname,\n        'Access-Control-Allow-Credentials': 'true'\n      }\n    });\n\n    \/\/ Set first-party HTTP header with 2-year persistence (730 days = 63072000 seconds)\n    response.headers.append(\n      'Set-Cookie',\n      `_ga=${gaClientId}; Max-Age=63072000; Path=\/; Domain=${url.hostname}; Secure; SameSite=Lax`\n    );\n\n    return response;\n  }\n};<\/code><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">3. Step-by-Step Integration with Google Analytics 4 &amp; GTM<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To ensure Google Tag Manager (GTM) utilizes the server-refreshed identifier without overriding it via client-side JavaScript, the web tracking container must be updated:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li><strong>Asynchronous Endpoint Calling:<\/strong> In frontend application code or via a GTM Custom HTML tag executing on initialization, invoke an asynchronous <code>fetch()<\/code> call to <code>\/fp-cookie-enrichment<\/code> with credentials enabled.<\/li>\r\n<li><strong>Cookie Write Suppression:<\/strong> In the GA4 Configuration Tag (or Google Tag), set the parameter <code>cookie_update<\/code> to <code>false<\/code>. This prevents the browser analytics script from overwriting the HTTP-only server expiration timestamp with a 7-day client-side date.<\/li>\r\n<li><strong>Server-Side GTM Forwarding:<\/strong> If using a Server-Side GTM (ssGTM) container, map the custom hostname to the same Cloudflare zone, allowing inbound event payloads to inherit the enriched two-year first-party cookie automatically.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">4. Summary &amp; Architectural Value<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>What this tutorial achieves:<\/strong> The successful deployment of a serverless Cloudflare Worker proxy running on the primary first-party hostname that intercepts, rewrites, and extends Google Analytics 4 and marketing cookies via server-side HTTP headers.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>Resulting value:<\/strong> Analytics tracking becomes immune to the 7-day and 24-hour cookie deletion caps imposed by Safari ITP and Firefox ETP. Session continuity and visitor identification are preserved for up to two full years, dramatically improving the accuracy of long-term customer journey analytics, multi-touch attribution models, and ROAS calculations without relying on intrusive third-party fingerprinting.<\/p>\r\n\n\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.cloudflare.com\/workers\/\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Workers documentation<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/tag-platform\/gtagjs\/configure\" target=\"_blank\" rel=\"noopener noreferrer\">Google tag: gtag.js configuration<\/a><\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>A technical step-by-step tutorial on extending GA4 session and cookie persistence up to two years against Safari ITP and Firefox ETP using Cloudflare Workers.<\/p>\n","protected":false},"author":1,"featured_media":14016,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113],"tags":[91147,91347,91276,91285,91258,91350,91516,91219],"class_list":["post-456","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-cloudflare","tag-cloudflare-workers","tag-cookies","tag-first-party-data","tag-google-analytics-4","tag-safari-itp","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>First-Party Cookie Enrichment via Cloudflare Workers - Lukas Wojcik - Blog<\/title>\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-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"First-Party Cookie Enrichment via Cloudflare Workers - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"A technical step-by-step tutorial on extending GA4 session and cookie persistence up to two years against Safari ITP and Firefox ETP using Cloudflare Workers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-10T07:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-456-first-party-cookie-enrichment-cloudf-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=\"luky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"luky\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 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-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/\"},\"author\":{\"name\":\"luky\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"First-Party Cookie Enrichment via Cloudflare Workers\",\"datePublished\":\"2026-09-10T07:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/\"},\"wordCount\":607,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-456-first-party-cookie-enrichment-cloudf-g.png\",\"keywords\":[\"Cloudflare\",\"Cloudflare Workers\",\"Cookies\",\"First-Party Data\",\"Google Analytics 4\",\"Safari ITP\",\"Tracking\",\"Tutorial\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/\",\"name\":\"First-Party Cookie Enrichment via Cloudflare Workers - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-456-first-party-cookie-enrichment-cloudf-g.png\",\"datePublished\":\"2026-09-10T07:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-456-first-party-cookie-enrichment-cloudf-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-456-first-party-cookie-enrichment-cloudf-g.png\",\"width\":1200,\"height\":630,\"caption\":\"First-Party Cookie Enrichment via Cloudflare Workers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/first-party-cookie-enrichment-via-cloudflare-workers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"First-Party Cookie Enrichment via Cloudflare Workers\"}]},{\"@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\":\"luky\",\"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\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/author\\\/luky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"First-Party Cookie Enrichment via Cloudflare Workers - Lukas Wojcik - Blog","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-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/","og_locale":"en_US","og_type":"article","og_title":"First-Party Cookie Enrichment via Cloudflare Workers - Lukas Wojcik - Blog","og_description":"A technical step-by-step tutorial on extending GA4 session and cookie persistence up to two years against Safari ITP and Firefox ETP using Cloudflare Workers.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-10T07:00:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-456-first-party-cookie-enrichment-cloudf-g.png","type":"image\/png"}],"author":"luky","twitter_card":"summary_large_image","twitter_misc":{"Written by":"luky","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/"},"author":{"name":"luky","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"First-Party Cookie Enrichment via Cloudflare Workers","datePublished":"2026-09-10T07:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/"},"wordCount":607,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-456-first-party-cookie-enrichment-cloudf-g.png","keywords":["Cloudflare","Cloudflare Workers","Cookies","First-Party Data","Google Analytics 4","Safari ITP","Tracking","Tutorial"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/","name":"First-Party Cookie Enrichment via Cloudflare Workers - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-456-first-party-cookie-enrichment-cloudf-g.png","datePublished":"2026-09-10T07:00:00+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-456-first-party-cookie-enrichment-cloudf-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-456-first-party-cookie-enrichment-cloudf-g.png","width":1200,"height":630,"caption":"First-Party Cookie Enrichment via Cloudflare Workers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/first-party-cookie-enrichment-via-cloudflare-workers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"First-Party Cookie Enrichment via Cloudflare Workers"}]},{"@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":"luky","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":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"],"url":"https:\/\/www.lukaswojcik.com\/blog\/author\/luky\/"}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/456","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=456"}],"version-history":[{"count":4,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"predecessor-version":[{"id":17520,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/456\/revisions\/17520"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/14016"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}