[{"data":1,"prerenderedAt":623},["ShallowReactive",2],{"rule-ga4-param-pii-risk":3},{"id":4,"title":5,"body":6,"breadcrumb":587,"coderail":594,"dateModified":613,"datePublished":613,"description":614,"extension":615,"meta":616,"navigation":408,"next":613,"path":617,"prev":613,"schemaType":618,"seo":619,"stem":620,"wide":621,"__hash__":622},"docs\u002Frules\u002Fga4-param-pii-risk.md","Event parameters with PII-risk names",{"type":7,"value":8,"toc":579},"minimark",[9,16,54,59,136,140,149,153,447,451,478,482,547,551,575],[10,11,12],"p",{},[13,14,15],"strong",{},"Summary",[17,18,19,30,36,42,48],"ul",{},[20,21,22,25,26],"li",{},[13,23,24],{},"rule_id"," — ",[27,28,29],"code",{},"ga4-param-pii-risk",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect GA4 event parameters, user properties, and config settings whose names match a known list of PII identifiers",[20,37,38,41],{},[13,39,40],{},"effect"," — PII-risk parameter names sent to GA4 violate Google's Terms of Service and can trigger data deletion",[20,43,44,47],{},[13,45,46],{},"layer"," — container",[20,49,50,53],{},[13,51,52],{},"reversibility"," — non-destructive",[55,56,58],"h2",{"id":57},"what-fires-this","What fires this",[10,60,61,62,65,66,69,70,73,74,77,78,69,81,69,84,69,87,69,90,69,93,69,96,69,99,69,102,69,105,69,108,69,111,69,114,69,117,69,120,69,123,69,126,69,129,73,132,135],{},"The rule calls ",[27,63,64],{},"getGA4Tags()"," to collect all active GA4 tags, then flattens each tag's ",[27,67,68],{},"eventParameters",", ",[27,71,72],{},"userProperties",", and ",[27,75,76],{},"configSettings"," into a single list. It tests each parameter name against a fixed set of PII-risk names: ",[27,79,80],{},"email",[27,82,83],{},"phone",[27,85,86],{},"ssn",[27,88,89],{},"first_name",[27,91,92],{},"last_name",[27,94,95],{},"birthdate",[27,97,98],{},"address",[27,100,101],{},"credit_card",[27,103,104],{},"password",[27,106,107],{},"ip_address",[27,109,110],{},"zip_code",[27,112,113],{},"phone_number",[27,115,116],{},"social_security",[27,118,119],{},"date_of_birth",[27,121,122],{},"full_name",[27,124,125],{},"user_email",[27,127,128],{},"user_phone",[27,130,131],{},"customer_email",[27,133,134],{},"customer_phone",". The comparison is case-insensitive. Any GA4 tag with at least one matching parameter name is included in the issue. Paused tags are excluded.",[55,137,139],{"id":138},"why-it-matters","Why it matters",[10,141,142,143,145,146,148],{},"Sending parameters named ",[27,144,80],{}," or ",[27,147,86],{}," to GA4 violates Google's Terms of Service regardless of whether the values are hashed. Google's PII detection scans parameter names, not just values. A flagged property can trigger automatic data deletion or account suspension. Even if you SHA-256-hash the value, using a PII-risk name as the key signals intent and keeps the risk active. Rename the parameter to a non-PII key and hash the value before sending. Regulatory: GDPR Art. 5 (data minimization), GDPR Art. 6 (lawful basis).",[55,150,152],{"id":151},"example","Before \u002F after",[154,155,156,228],"compare",{},[157,158,160],"compare-col",{"label":159},"Before — flagged",[161,162,167],"pre",{"className":163,"code":164,"language":165,"meta":166,"style":166},"language-js shiki shiki-themes github-light github-dark","\u002F\u002F GA4 event tag — parameter names trigger the rule\ndataLayer.push({\n  event: 'sign_up',\n  email: user.email,       \u002F\u002F PII-risk name — flagged\n  phone: user.phoneNumber  \u002F\u002F PII-risk name — flagged\n})\n","js","",[27,168,169,178,192,205,214,222],{"__ignoreMap":166},[170,171,174],"span",{"class":172,"line":173},"line",1,[170,175,177],{"class":176},"sJ8bj","\u002F\u002F GA4 event tag — parameter names trigger the rule\n",[170,179,181,185,189],{"class":172,"line":180},2,[170,182,184],{"class":183},"sVt8B","dataLayer.",[170,186,188],{"class":187},"sScJk","push",[170,190,191],{"class":183},"({\n",[170,193,195,198,202],{"class":172,"line":194},3,[170,196,197],{"class":183},"  event: ",[170,199,201],{"class":200},"sZZnC","'sign_up'",[170,203,204],{"class":183},",\n",[170,206,208,211],{"class":172,"line":207},4,[170,209,210],{"class":183},"  email: user.email,       ",[170,212,213],{"class":176},"\u002F\u002F PII-risk name — flagged\n",[170,215,217,220],{"class":172,"line":216},5,[170,218,219],{"class":183},"  phone: user.phoneNumber  ",[170,221,213],{"class":176},[170,223,225],{"class":172,"line":224},6,[170,226,227],{"class":183},"})\n",[157,229,231],{"label":230},"After — fixed",[161,232,234],{"className":163,"code":233,"language":165,"meta":166,"style":166},"\u002F\u002F Rename to a non-PII key; hash the value before sending\nasync function hashValue(raw) {\n  const buf = await crypto.subtle.digest(\n    'SHA-256',\n    new TextEncoder().encode(raw)\n  )\n  return Array.from(new Uint8Array(buf))\n    .map(b => b.toString(16).padStart(2, '0')).join('')\n}\n\ndataLayer.push({\n  event: 'sign_up',\n  hashed_user_id: await hashValue(user.email)\n})\n",[27,235,236,241,263,287,294,311,316,339,397,403,410,419,428,442],{"__ignoreMap":166},[170,237,238],{"class":172,"line":173},[170,239,240],{"class":176},"\u002F\u002F Rename to a non-PII key; hash the value before sending\n",[170,242,243,247,250,253,256,260],{"class":172,"line":180},[170,244,246],{"class":245},"szBVR","async",[170,248,249],{"class":245}," function",[170,251,252],{"class":187}," hashValue",[170,254,255],{"class":183},"(",[170,257,259],{"class":258},"s4XuR","raw",[170,261,262],{"class":183},") {\n",[170,264,265,268,272,275,278,281,284],{"class":172,"line":194},[170,266,267],{"class":245},"  const",[170,269,271],{"class":270},"sj4cs"," buf",[170,273,274],{"class":245}," =",[170,276,277],{"class":245}," await",[170,279,280],{"class":183}," crypto.subtle.",[170,282,283],{"class":187},"digest",[170,285,286],{"class":183},"(\n",[170,288,289,292],{"class":172,"line":207},[170,290,291],{"class":200},"    'SHA-256'",[170,293,204],{"class":183},[170,295,296,299,302,305,308],{"class":172,"line":216},[170,297,298],{"class":245},"    new",[170,300,301],{"class":187}," TextEncoder",[170,303,304],{"class":183},"().",[170,306,307],{"class":187},"encode",[170,309,310],{"class":183},"(raw)\n",[170,312,313],{"class":172,"line":224},[170,314,315],{"class":183},"  )\n",[170,317,319,322,325,328,330,333,336],{"class":172,"line":318},7,[170,320,321],{"class":245},"  return",[170,323,324],{"class":183}," Array.",[170,326,327],{"class":187},"from",[170,329,255],{"class":183},[170,331,332],{"class":245},"new",[170,334,335],{"class":187}," Uint8Array",[170,337,338],{"class":183},"(buf))\n",[170,340,342,345,348,350,353,356,359,362,364,367,370,373,375,378,380,383,386,389,391,394],{"class":172,"line":341},8,[170,343,344],{"class":183},"    .",[170,346,347],{"class":187},"map",[170,349,255],{"class":183},[170,351,352],{"class":258},"b",[170,354,355],{"class":245}," =>",[170,357,358],{"class":183}," b.",[170,360,361],{"class":187},"toString",[170,363,255],{"class":183},[170,365,366],{"class":270},"16",[170,368,369],{"class":183},").",[170,371,372],{"class":187},"padStart",[170,374,255],{"class":183},[170,376,377],{"class":270},"2",[170,379,69],{"class":183},[170,381,382],{"class":200},"'0'",[170,384,385],{"class":183},")).",[170,387,388],{"class":187},"join",[170,390,255],{"class":183},[170,392,393],{"class":200},"''",[170,395,396],{"class":183},")\n",[170,398,400],{"class":172,"line":399},9,[170,401,402],{"class":183},"}\n",[170,404,406],{"class":172,"line":405},10,[170,407,409],{"emptyLinePlaceholder":408},true,"\n",[170,411,413,415,417],{"class":172,"line":412},11,[170,414,184],{"class":183},[170,416,188],{"class":187},[170,418,191],{"class":183},[170,420,422,424,426],{"class":172,"line":421},12,[170,423,197],{"class":183},[170,425,201],{"class":200},[170,427,204],{"class":183},[170,429,431,434,437,439],{"class":172,"line":430},13,[170,432,433],{"class":183},"  hashed_user_id: ",[170,435,436],{"class":245},"await",[170,438,252],{"class":187},[170,440,441],{"class":183},"(user.email)\n",[170,443,445],{"class":172,"line":444},14,[170,446,227],{"class":183},[55,448,450],{"id":449},"remediation","Remediation",[452,453,454,457,463,466,469,472,475],"ol",{},[20,455,456],{},"Open each flagged GA4 tag in GTM (Google Tag Manager).",[20,458,459,460,369],{},"Identify every parameter name listed in the issue (",[27,461,462],{},"piiParams",[20,464,465],{},"Determine whether the value is a real user identifier or a coincidental name match.",[20,467,468],{},"If the value is PII: rename the parameter to a non-PII key and hash the value with SHA-256 before sending.",[20,470,471],{},"If the value is not PII: rename the parameter to a name that does not appear in the PII-risk list.",[20,473,474],{},"If the data should not be collected at all: remove the parameter from the tag entirely.",[20,476,477],{},"Publish the updated container and verify the parameter name no longer appears in GA4 DebugView.",[55,479,481],{"id":480},"metadata","Metadata",[483,484,487,488,493,487,497,501,487,504,508,487,511,514,487,517,521,487,524,528,487,534,537,487,540,544],"dl",{"className":485},[486],"spec-list","\n  ",[489,490,492],"dt",{"id":491},"severity","Severity",[494,495,496],"dd",{},"critical",[489,498,500],{"id":499},"tier","Tier",[494,502,503],{},"error",[489,505,507],{"id":506},"category","Category",[494,509,510],{},"ga4",[489,512,513],{"id":46},"Layer",[494,515,516],{},"container",[489,518,520],{"id":519},"version","Version",[494,522,523],{},"1",[489,525,527],{"id":526},"effort","Effort",[494,529,530,533],{},[27,531,532],{},"15min"," (about 15 minutes)",[489,535,536],{"id":52},"Reversibility",[494,538,539],{},"non-destructive",[489,541,543],{"id":542},"regulatory","Regulatory",[494,545,546],{},"GDPR Art. 5 (data minimization), GDPR Art. 6 (lawful basis)",[55,548,550],{"id":549},"see-also","See also",[17,552,553,561,568],{},[20,554,555,560],{},[556,557,559],"a",{"href":558},"\u002Fcategories\u002Fga4\u002F","GA4 rules"," — other rules in this category",[20,562,563,567],{},[556,564,566],{"href":565},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,569,570,574],{},[556,571,573],{"href":572},"\u002Frules\u002F","Rules catalog"," — browse all rules",[576,577,578],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":166,"searchDepth":180,"depth":180,"links":580},[581,582,583,584,585,586],{"id":57,"depth":180,"text":58},{"id":138,"depth":180,"text":139},{"id":151,"depth":180,"text":152},{"id":449,"depth":180,"text":450},{"id":480,"depth":180,"text":481},{"id":549,"depth":180,"text":550},[588,591,593],{"label":589,"href":590},"API Reference","\u002F",{"label":592,"href":572},"Rules",{"label":29},{"cards":595,"onpage":607},[596],{"title":597,"tabs":598},"Evaluate",[599,603],{"label":600,"language":601,"code":602},"cURL","bash","curl https:\u002F\u002Fdeveloper.tagmanifest.com\u002Fv1\u002Fevaluate-rule \\\n  -H \"Authorization: Bearer $TM_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"rule_id\":\"ga4-param-pii-risk\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":604,"language":605,"code":606},"MCP","text","User: Run ga4-param-pii-risk on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"ga4-param-pii-risk\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[608,609,610,611,612],{"id":57,"label":58},{"id":138,"label":139},{"id":151,"label":152},{"id":449,"label":450},{"id":480,"label":481},null,"Parameters with names that strongly suggest personally identifiable information is being collected.","md",{},"\u002Frules\u002Fga4-param-pii-risk","TechArticle",{"title":5,"description":614},"rules\u002Fga4-param-pii-risk",false,"tGpx4Fp21W8W2mUKJl2DXZAdtCeOVY22KQo4s2o9kQ8",1796069483875]