[{"data":1,"prerenderedAt":474},["ShallowReactive",2],{"rule-datalayer-pii-push":3},{"id":4,"title":5,"body":6,"breadcrumb":437,"coderail":445,"dateModified":464,"datePublished":464,"description":465,"extension":466,"meta":467,"navigation":167,"next":464,"path":468,"prev":464,"schemaType":469,"seo":470,"stem":471,"wide":472,"__hash__":473},"docs\u002Frules\u002Fdatalayer-pii-push.md","Form data pushed to dataLayer (potential PII leak)",{"type":7,"value":8,"toc":429},"minimark",[9,16,54,59,92,96,99,103,296,300,328,332,397,401,425],[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",{},"datalayer-pii-push",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect Custom HTML tags pushing raw form data into the dataLayer",[20,37,38,41],{},[13,39,40],{},"effect"," — Form field values (email, phone, names) exposed to every tag in the container",[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,69,73,76,77,69,80,83,84,87,88,91],{},"The rule checks active Custom HTML tags where ",[27,63,64],{},"codeAnalysis.hasDataLayerPush"," is true and the tag code matches at least one of four form-serialization patterns: ",[27,67,68],{},"form.vals()",", ",[27,71,72],{},"form.serialize()",[27,74,75],{},".val()"," used in a serialization context, or variable names matching ",[27,78,79],{},"formValues",[27,81,82],{},"formData",", or ",[27,85,86],{},"form_data",". All four patterns indicate raw form data is being collected before the ",[27,89,90],{},"dataLayer.push()"," call. Paused tags are excluded.",[55,93,95],{"id":94},"why-it-matters","Why it matters",[10,97,98],{},"Once form data lands in the dataLayer, every tag in the container can read it — including ad pixels and third-party scripts. Form fields commonly contain email addresses, phone numbers, and names. The exposure propagates to all listening tags simultaneously, with no further action required by the tag author. This makes it one of the highest-leverage PII leaks in a GTM (Google Tag Manager) container. Regulatory: GDPR Art. 5 (data minimization), GDPR Art. 6 (lawful basis), CCPA\u002FCPRA.",[55,100,102],{"id":101},"example","Before \u002F after",[104,105,106,208],"compare",{},[107,108,110],"compare-col",{"label":109},"Before — flagged",[111,112,117],"pre",{"className":113,"code":114,"language":115,"meta":116,"style":116},"language-js shiki shiki-themes github-light github-dark","\u002F\u002F Raw form data pushed to dataLayer\nvar formData = $('form').serialize()\n\ndataLayer.push({\n  event: 'form_submit',\n  formData: formData  \u002F\u002F contains email, phone, names — flagged\n})\n","js","",[27,118,119,128,162,169,181,193,202],{"__ignoreMap":116},[120,121,124],"span",{"class":122,"line":123},"line",1,[120,125,127],{"class":126},"sJ8bj","\u002F\u002F Raw form data pushed to dataLayer\n",[120,129,131,135,139,142,146,149,153,156,159],{"class":122,"line":130},2,[120,132,134],{"class":133},"szBVR","var",[120,136,138],{"class":137},"sVt8B"," formData ",[120,140,141],{"class":133},"=",[120,143,145],{"class":144},"sScJk"," $",[120,147,148],{"class":137},"(",[120,150,152],{"class":151},"sZZnC","'form'",[120,154,155],{"class":137},").",[120,157,158],{"class":144},"serialize",[120,160,161],{"class":137},"()\n",[120,163,165],{"class":122,"line":164},3,[120,166,168],{"emptyLinePlaceholder":167},true,"\n",[120,170,172,175,178],{"class":122,"line":171},4,[120,173,174],{"class":137},"dataLayer.",[120,176,177],{"class":144},"push",[120,179,180],{"class":137},"({\n",[120,182,184,187,190],{"class":122,"line":183},5,[120,185,186],{"class":137},"  event: ",[120,188,189],{"class":151},"'form_submit'",[120,191,192],{"class":137},",\n",[120,194,196,199],{"class":122,"line":195},6,[120,197,198],{"class":137},"  formData: formData  ",[120,200,201],{"class":126},"\u002F\u002F contains email, phone, names — flagged\n",[120,203,205],{"class":122,"line":204},7,[120,206,207],{"class":137},"})\n",[107,209,211],{"label":210},"After — fixed",[111,212,214],{"className":113,"code":213,"language":115,"meta":116,"style":116},"\u002F\u002F Push only non-PII identifiers\ndataLayer.push({\n  event: 'form_submit',\n  formId: $('form').attr('id'),\n  formName: $('form').attr('name'),\n  formStatus: 'submitted'\n})\n",[27,215,216,221,229,237,262,284,292],{"__ignoreMap":116},[120,217,218],{"class":122,"line":123},[120,219,220],{"class":126},"\u002F\u002F Push only non-PII identifiers\n",[120,222,223,225,227],{"class":122,"line":130},[120,224,174],{"class":137},[120,226,177],{"class":144},[120,228,180],{"class":137},[120,230,231,233,235],{"class":122,"line":164},[120,232,186],{"class":137},[120,234,189],{"class":151},[120,236,192],{"class":137},[120,238,239,242,245,247,249,251,254,256,259],{"class":122,"line":171},[120,240,241],{"class":137},"  formId: ",[120,243,244],{"class":144},"$",[120,246,148],{"class":137},[120,248,152],{"class":151},[120,250,155],{"class":137},[120,252,253],{"class":144},"attr",[120,255,148],{"class":137},[120,257,258],{"class":151},"'id'",[120,260,261],{"class":137},"),\n",[120,263,264,267,269,271,273,275,277,279,282],{"class":122,"line":183},[120,265,266],{"class":137},"  formName: ",[120,268,244],{"class":144},[120,270,148],{"class":137},[120,272,152],{"class":151},[120,274,155],{"class":137},[120,276,253],{"class":144},[120,278,148],{"class":137},[120,280,281],{"class":151},"'name'",[120,283,261],{"class":137},[120,285,286,289],{"class":122,"line":195},[120,287,288],{"class":137},"  formStatus: ",[120,290,291],{"class":151},"'submitted'\n",[120,293,294],{"class":122,"line":204},[120,295,207],{"class":137},[55,297,299],{"id":298},"remediation","Remediation",[301,302,303,313,316,319,322,325],"ol",{},[20,304,305,306,69,308,69,310,312],{},"Open each flagged Custom HTML tag and locate the form-serialization call (",[27,307,72],{},[27,309,68],{},[27,311,75],{},", or the named variable).",[20,314,315],{},"Identify which field values the downstream tags actually consume.",[20,317,318],{},"Replace the serialization call with explicit pushes of non-PII identifiers: form ID, form name, submission status.",[20,320,321],{},"If a specific field value is required (such as product type from a quote form), hash it with SHA-256 before pushing — never push the raw value.",[20,323,324],{},"Remove the serialization variable entirely from the tag code.",[20,326,327],{},"Verify downstream tags receive the data they need without raw field values present in the dataLayer.",[55,329,331],{"id":330},"metadata","Metadata",[333,334,337,338,343,337,347,351,337,354,358,337,361,364,337,367,371,337,374,378,337,384,387,337,390,394],"dl",{"className":335},[336],"spec-list","\n  ",[339,340,342],"dt",{"id":341},"severity","Severity",[344,345,346],"dd",{},"high",[339,348,350],{"id":349},"tier","Tier",[344,352,353],{},"error",[339,355,357],{"id":356},"category","Category",[344,359,360],{},"pii",[339,362,363],{"id":46},"Layer",[344,365,366],{},"container",[339,368,370],{"id":369},"version","Version",[344,372,373],{},"1",[339,375,377],{"id":376},"effort","Effort",[344,379,380,383],{},[27,381,382],{},"2hr"," (about 2 hours)",[339,385,386],{"id":52},"Reversibility",[344,388,389],{},"non-destructive",[339,391,393],{"id":392},"regulatory","Regulatory",[344,395,396],{},"GDPR Art. 5 (data minimization), GDPR Art. 6 (lawful basis), CCPA\u002FCPRA",[55,398,400],{"id":399},"see-also","See also",[17,402,403,411,418],{},[20,404,405,410],{},[406,407,409],"a",{"href":408},"\u002Fcategories\u002Fpii\u002F","PII rules"," — other rules in this category",[20,412,413,417],{},[406,414,416],{"href":415},"\u002Frules\u002Fbtoa-pii\u002F","Base64 encoding used for PII"," — related PII encoding pattern",[20,419,420,424],{},[406,421,423],{"href":422},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[426,427,428],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}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);}",{"title":116,"searchDepth":130,"depth":130,"links":430},[431,432,433,434,435,436],{"id":57,"depth":130,"text":58},{"id":94,"depth":130,"text":95},{"id":101,"depth":130,"text":102},{"id":298,"depth":130,"text":299},{"id":330,"depth":130,"text":331},{"id":399,"depth":130,"text":400},[438,441,444],{"label":439,"href":440},"API Reference","\u002F",{"label":442,"href":443},"Rules","\u002Frules\u002F",{"label":29},{"cards":446,"onpage":458},[447],{"title":448,"tabs":449},"Evaluate",[450,454],{"label":451,"language":452,"code":453},"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\":\"datalayer-pii-push\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":455,"language":456,"code":457},"MCP","text","User: Run datalayer-pii-push on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"datalayer-pii-push\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[459,460,461,462,463],{"id":57,"label":58},{"id":94,"label":95},{"id":101,"label":102},{"id":298,"label":299},{"id":330,"label":331},null,"Detects Custom HTML tags that push raw form data into the dataLayer, exposing potential PII to every tag in the container.","md",{},"\u002Frules\u002Fdatalayer-pii-push","TechArticle",{"title":5,"description":465},"rules\u002Fdatalayer-pii-push",false,"k8v1jweTt87AJoDqjPXdO6U5kRW0IY0KioAxQsSp954",1796069484214]