{"id":435,"date":"2026-09-02T08:00:00","date_gmt":"2026-09-02T06:00:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?p=435"},"modified":"2026-10-24T01:42:42","modified_gmt":"2026-10-23T23:42:42","slug":"server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/","title":{"rendered":"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM"},"content":{"rendered":"<p>Email addresses, telephone numbers and access tokens can accidentally reach analytics systems through URLs, page titles or form fields. Server-side Google Tag Manager (ssGTM) adds a filtering point before configured tags send data onward. This reduces exposure, but does not automatically make a collection anonymous or compliant.<\/p>\n<h2>1. Prevent collection at the source<\/h2>\n<p>Personal data should not enter analytics URLs. Google Analytics prohibits PII in ordinary URL and event fields; hashing an email address does not turn a custom parameter into an approved customer-data channel. Dedicated user-provided-data features have separate fields, configuration and policy requirements.<\/p>\n<p>Hashing, encryption and anonymisation serve different purposes. A hash used to match a customer can remain personal data. The GDPR does not impose a blanket rule that every permitted disclosure must first be hashed; lawful processing, data minimisation and appropriate security remain necessary.<\/p>\n<p>POST avoids placing form values in the URL, but still transmits a request body. HTTPS, restricted logging and control over analytics collection remain necessary. An ssGTM filter cannot retrospectively remove information already stored in browser history, proxies or vendor systems. An incident requires stopping collection and assessing deletion in each affected system.<\/p>\n<figure class=\"lw-diagram\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-435-pii-20261024.png\" width=\"1120\" height=\"580\" alt=\"Controlled filtering before selected tags\"><figcaption>Only the approved event-data path is filtered; raw requests, logs and browser tags require separate controls.<\/figcaption><\/figure>\n<h2>2. Define the boundary of the filter<\/h2>\n<p>The ssGTM client converts an incoming request into event data. Transformations can modify, allow or exclude event parameters before selected tags read the data. Affected Tags and Matching Conditions determine coverage; defaults cover all tags and events, but later configuration changes can narrow that scope.<\/p>\n<p>This is not a global rewrite of the HTTP request. A template with permission to read request headers or the raw body can access a separate data source. Browser pixels, server logs, client code and other outbound integrations need their own review. Different transformations or tag mappings can also produce different outbound payloads.<\/p>\n<h2>3. Prefer explicit fields and known routes<\/h2>\n<p>A regular expression detects a pattern, not the meaning of data. An email pattern can miss encoded or unusual addresses. A 9\u201315 digit pattern also matches order IDs and timestamps; eleven digits do not establish a valid PESEL number. A checksum test would still not establish that a number is safe to disclose.<\/p>\n<p>A smaller data model is easier to check: no arbitrary form text, only approved parameters, and canonical page routes without identifiers. The following illustrative variable accepts three exact URLs and discards every query string and fragment. Unknown routes and non-string inputs return <code>undefined<\/code>. The example domain and routes require replacement with reviewed site values.<\/p>\n<pre><code>const getEventData = require(&#x27;getEventData&#x27;);\nconst getType = require(&#x27;getType&#x27;);\nconst value = getEventData(data.parameter);\nif (getType(value) !== &#x27;string&#x27;) return undefined;\nconst base = value.split(&#x27;#&#x27;)[0].split(&#x27;?&#x27;)[0];\nconst allowed = [\n  &#x27;https:\/\/www.example.com\/&#x27;,\n  &#x27;https:\/\/www.example.com\/products&#x27;,\n  &#x27;https:\/\/www.example.com\/checkout\/complete&#x27;\n];\nfor (let i = 0; i &lt; allowed.length; i++) {\n  if (base === allowed[i]) return allowed[i];\n}\nreturn undefined;\n<\/code><\/pre>\n<p>The template needs a text field named <code>parameter<\/code> and <code>read_event_data<\/code> permission limited to the relevant URL field. The return value always comes from the static list; encoded parameter names and double-encoded query values cannot pass through that output. This is deliberately restrictive and also removes campaign parameters. It is not a general-purpose PII detector.<\/p>\n<h2>4. Apply the rule without a raw-value fallback<\/h2>\n<ol>\n<li>Separate variables evaluate <code>page_location<\/code> and any other approved URL field. The same allowlist is unsuitable for arbitrary external referrers; an unknown referrer must be omitted or handled by its own reviewed policy.<\/li>\n<li>An Augment event transformation supplies accepted canonical URLs to the intended tags. Unneeded free-text fields are excluded; a parameter allowlist must retain the technical fields required by the selected tags.<\/li>\n<li>A rejected value must explicitly block the affected tag or cause explicit field exclusion. Returning <code>undefined<\/code> alone is not proof of removal: a tag can fall back to a raw URL or another source.<\/li>\n<li>Transformation order, affected tags, conditions and template permissions need review. A later transformation must not restore the raw value.<\/li>\n<\/ol>\n<p>GA4 and Meta require separate outbound inspection. Meta customer-data fields do not all use SHA-256: email and phone matching differ from fields such as client IP, user agent and browser identifiers. A cleaned URL neither authorizes those fields nor anonymises the complete event.<\/p>\n<h2>5. Test the outbound request<\/h2>\n<p>Test data should be synthetic: uppercase and encoded parameter names, <code>%40<\/code>, double encoding, fragments, repeated keys, invalid types, unknown paths and token-bearing URLs. A known route such as <code>https:\/\/www.example.com\/products?email=test%40example.com<\/code> must return only <code>https:\/\/www.example.com\/products<\/code>. An unknown path must fail the allowlist.<\/p>\n<p>The variable logic can be tested separately, but publication also requires ssGTM preview checks of every destination and the actual outgoing payload. The incoming preview still contains the original request. Log retention and access therefore require separate controls.<\/p>\n<div class=\"lw-faq\">\n<h2>Questions and answers<\/h2>\n<h3>Are later tags automatically protected?<\/h3>\n<p>Only the configured data path is covered. A new tag must match the transformation scope, consume the transformed field and avoid raw-request fallbacks. Each new tag needs an outbound test.<\/p>\n<h3>Does URL cleaning remove all personal data?<\/h3>\n<p>No. Titles, search terms, nested objects, cookies, identifiers and custom fields can contain personal data. The safest field can be an omitted field; free text should not be collected merely because a regex is available.<\/p>\n<\/div>\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/server-side\" target=\"_blank\" rel=\"noopener noreferrer\">Server-side tagging overview<\/a><\/li>\n<li><a href=\"https:\/\/eur-lex.europa.eu\/eli\/reg\/2016\/679\/oj\" target=\"_blank\" rel=\"noopener noreferrer\">Regulation (EU) 2016\/679 (GDPR)<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/server-side\/transformations\" target=\"_blank\" rel=\"noopener noreferrer\">Server-side tagging: Transformations<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/server-side\/api\" target=\"_blank\" rel=\"noopener noreferrer\">Server-side tagging APIs<\/a><\/li>\n<li><a href=\"https:\/\/support.google.com\/analytics\/answer\/6366371\" target=\"_blank\" rel=\"noopener noreferrer\">PII policy for URLs and ordinary analytics fields<\/a><\/li>\n<li><a href=\"https:\/\/support.google.com\/analytics\/answer\/14077171?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">Dedicated user-provided-data feature and conditions<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/ga4\/uid-data\" target=\"_blank\" rel=\"noopener noreferrer\">Dedicated user_data fields and hashing<\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/facebook\/facebook-python-business-sdk\/main\/facebook_business\/adobjects\/serverside\/user_data.py\" target=\"_blank\" rel=\"noopener noreferrer\">Meta SDK normalize(): email\/phone normalization versus direct IP\/UA\/fbc\/fbp<\/a><\/li>\n<li><a href=\"https:\/\/www.edpb.europa.eu\/topics\/ai-and-technology\/anonymisation-pseudonymisation_en\" target=\"_blank\" rel=\"noopener noreferrer\">Pseudonymisation versus anonymisation<\/a><\/li>\n<li><a href=\"https:\/\/commission.europa.eu\/law\/law-topic\/data-protection\/information-business-and-organisations\/application-gdpr_en?prefLang=nl\" target=\"_blank\" rel=\"noopener noreferrer\">Identifiable pseudonymised and encrypted data remain personal data<\/a><\/li>\n<li><a href=\"https:\/\/eur-lex.europa.eu\/eli\/reg\/2016\/679\/oj\/eng\/\" target=\"_blank\" rel=\"noopener noreferrer\">Risk-based safeguards and data minimisation; official search extract<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to construct custom Sandboxed JavaScript variables in Server-Side GTM to automatically detect and scrub leaking phone numbers, email addresses, and PESEL numbers from URLs.<\/p>\n","protected":false},"author":1,"featured_media":13995,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[91279,91270,91267,91312,91114,91061],"class_list":["post-435","post","type-post","status-publish","format-standard","hentry","category-digital-marketing","tag-prywatnosc-danych-pl","tag-gdpr","tag-google-tag-manager","tag-javascript","tag-pii-protection","tag-server-side-gtm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Server-Side PII Redaction: Building a Privacy Firewall in ssGTM | Lukas Wojcik<\/title>\n<meta name=\"description\" content=\"Redact PII in Server-Side GTM: detect emails, phone numbers and PESEL identifiers in URLs using variables or transformations.\" \/>\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\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"Redact PII in Server-Side GTM: detect emails, phone numbers and PESEL identifiers in URLs using variables or transformations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-02T06:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-23T23:42:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-435-server-side-pii-redaction-privacy-fi-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=\"3 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\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM\",\"datePublished\":\"2026-09-02T06:00:00+00:00\",\"dateModified\":\"2026-10-23T23:42:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/\"},\"wordCount\":866,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-435-server-side-pii-redaction-privacy-fi-g.png\",\"keywords\":[\"Data Privacy\",\"GDPR\",\"Google Tag Manager\",\"JavaScript\",\"PII Protection\",\"Server-Side GTM\"],\"articleSection\":[\"Digital Marketing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/\",\"name\":\"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-435-server-side-pii-redaction-privacy-fi-g.png\",\"datePublished\":\"2026-09-02T06:00:00+00:00\",\"dateModified\":\"2026-10-23T23:42:42+00:00\",\"description\":\"Redact PII in Server-Side GTM: detect emails, phone numbers and PESEL identifiers in URLs using variables or transformations.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-435-server-side-pii-redaction-privacy-fi-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-435-server-side-pii-redaction-privacy-fi-g.png\",\"width\":1200,\"height\":630,\"caption\":\"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM\"}]},{\"@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":"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM | Lukas Wojcik","description":"Redact PII in Server-Side GTM: detect emails, phone numbers and PESEL identifiers in URLs using variables or transformations.","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\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/","og_locale":"en_US","og_type":"article","og_title":"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM | Lukas Wojcik","og_description":"Redact PII in Server-Side GTM: detect emails, phone numbers and PESEL identifiers in URLs using variables or transformations.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-02T06:00:00+00:00","article_modified_time":"2026-10-23T23:42:42+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-435-server-side-pii-redaction-privacy-fi-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM","datePublished":"2026-09-02T06:00:00+00:00","dateModified":"2026-10-23T23:42:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/"},"wordCount":866,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-435-server-side-pii-redaction-privacy-fi-g.png","keywords":["Data Privacy","GDPR","Google Tag Manager","JavaScript","PII Protection","Server-Side GTM"],"articleSection":["Digital Marketing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/","name":"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-435-server-side-pii-redaction-privacy-fi-g.png","datePublished":"2026-09-02T06:00:00+00:00","dateModified":"2026-10-23T23:42:42+00:00","description":"Redact PII in Server-Side GTM: detect emails, phone numbers and PESEL identifiers in URLs using variables or transformations.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-435-server-side-pii-redaction-privacy-fi-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-435-server-side-pii-redaction-privacy-fi-g.png","width":1200,"height":630,"caption":"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/server-side-pii-redaction-building-a-privacy-firewall-in-ssgtm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Server-Side PII Redaction: Building a Privacy Firewall in ssGTM"}]},{"@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\/435","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=435"}],"version-history":[{"count":6,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/435\/revisions"}],"predecessor-version":[{"id":23042,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/435\/revisions\/23042"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/13995"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}