[{"data":1,"prerenderedAt":328},["ShallowReactive",2],{"rule-trigger-broad-custom-event":3},{"id":4,"title":5,"body":6,"breadcrumb":291,"coderail":298,"dateModified":317,"datePublished":317,"description":318,"extension":319,"meta":320,"navigation":321,"next":317,"path":322,"prev":317,"schemaType":323,"seo":324,"stem":325,"wide":326,"__hash__":327},"docs\u002Frules\u002Ftrigger-broad-custom-event.md","Custom event trigger with no filter conditions",{"type":7,"value":8,"toc":281},"minimark",[9,16,54,59,106,110,121,125,152,156,191,195,253,257],[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",{},"trigger-broad-custom-event",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect custom event triggers with no filter conditions that fire on every matching event regardless of context",[20,37,38,41],{},[13,39,40],{},"effect"," — Tags on unfiltered triggers receive data from unrelated event contexts",[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,77,81,77,84,77,87,77,90,77,93,77,96,77,99,77,102,105],{},"The rule checks all triggers where ",[27,63,64],{},"type === 'CUSTOM_EVENT'"," and ",[27,67,68],{},"filter"," is absent or empty. CMP consent events are excluded. Triggers whose ",[27,71,72],{},"customEvent"," values match known consent management patterns — ",[27,75,76],{},"OneTrustGroupsUpdated",", ",[27,79,80],{},"gtm_consent_update",[27,82,83],{},"cookie_consent_update",[27,85,86],{},"cookiebot*",[27,88,89],{},"uc_*",[27,91,92],{},"didomi_*",[27,94,95],{},"consent_initialized",[27,97,98],{},"consent_update",[27,100,101],{},"consent_granted",[27,103,104],{},"consent_denied"," — are not flagged. These events are inherently scoped by the CMP and do not benefit from additional filter conditions. All other unfiltered custom event triggers are flagged.",[55,107,109],{"id":108},"why-it-matters","Why it matters",[10,111,112,113,116,117,120],{},"A custom event trigger with no filter conditions fires every time its event name appears in the dataLayer, on any page and under any context. When multiple user actions push the same event name — for example, a generic ",[27,114,115],{},"form_submit"," event from contact forms, demo request forms, and newsletter signups — every tag on that trigger fires for every form type. Adding a filter condition that checks a dataLayer variable such as ",[27,118,119],{},"form_type"," scopes the trigger to the intended context. Without filters, conversion tags receive submissions they were never meant to track.",[55,122,124],{"id":123},"example","Before \u002F after",[126,127,128,138],"compare",{},[129,130,132],"compare-col",{"label":131},"Before — flagged",[10,133,134,135,137],{},"Trigger \"CE - Form Submit\" listens for ",[27,136,115],{}," with no filter conditions.\nIt fires on every form on the site: contact, demo request, and newsletter.\nThe demo request conversion tag receives all three.",[129,139,141],{"label":140},"After — fixed",[10,142,143,144,147,148,151],{},"Trigger \"CE - Form Submit - Demo\" adds a filter condition:\n",[27,145,146],{},"{{DLV - form_type}}"," equals ",[27,149,150],{},"demo_request",".\nThe conversion tag fires only on demo request submissions.",[55,153,155],{"id":154},"remediation","Remediation",[157,158,159,162,171,174,185,188],"ol",{},[20,160,161],{},"Open each flagged trigger and identify every tag it fires.",[20,163,164,165,77,167,170],{},"Examine the dataLayer push that produces the custom event. Note what additional context is available: ",[27,166,119],{},[27,168,169],{},"form_id",", page path, product category.",[20,172,173],{},"Decide whether the trigger is intentionally broad — the tag should fire for all occurrences — or whether a narrower scope is needed.",[20,175,176,177,179,180,147,182,184],{},"If narrower scope is needed: add filter conditions to the trigger. Example: Event equals ",[27,178,115],{}," AND ",[27,181,146],{},[27,183,150],{},".",[20,186,187],{},"If the trigger is genuinely broad by design: leave it and document the intent in the trigger description field.",[20,189,190],{},"Test in GTM Preview. Push the event from each context and confirm only the intended tags fire.",[55,192,194],{"id":193},"metadata","Metadata",[196,197,200,201,206,200,210,214,200,217,221,200,224,227,200,230,234,200,237,241,200,247,250],"dl",{"className":198},[199],"spec-list","\n  ",[202,203,205],"dt",{"id":204},"severity","Severity",[207,208,209],"dd",{},"medium",[202,211,213],{"id":212},"tier","Tier",[207,215,216],{},"optimization",[202,218,220],{"id":219},"category","Category",[207,222,223],{},"quality",[202,225,226],{"id":46},"Layer",[207,228,229],{},"container",[202,231,233],{"id":232},"version","Version",[207,235,236],{},"1",[202,238,240],{"id":239},"effort","Effort",[207,242,243,246],{},[27,244,245],{},"15min"," (about 15 minutes)",[202,248,249],{"id":52},"Reversibility",[207,251,252],{},"non-destructive",[55,254,256],{"id":255},"see-also","See also",[17,258,259,267,274],{},[20,260,261,266],{},[262,263,265],"a",{"href":264},"\u002Fcategories\u002Fquality\u002F","Quality rules"," — other rules in this category",[20,268,269,273],{},[262,270,272],{"href":271},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,275,276,280],{},[262,277,279],{"href":278},"\u002Frules\u002F","Rules catalog"," — browse all rules",{"title":282,"searchDepth":283,"depth":283,"links":284},"",2,[285,286,287,288,289,290],{"id":57,"depth":283,"text":58},{"id":108,"depth":283,"text":109},{"id":123,"depth":283,"text":124},{"id":154,"depth":283,"text":155},{"id":193,"depth":283,"text":194},{"id":255,"depth":283,"text":256},[292,295,297],{"label":293,"href":294},"API Reference","\u002F",{"label":296,"href":278},"Rules",{"label":29},{"cards":299,"onpage":311},[300],{"title":301,"tabs":302},"Evaluate",[303,307],{"label":304,"language":305,"code":306},"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\":\"trigger-broad-custom-event\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":308,"language":309,"code":310},"MCP","text","User: Run trigger-broad-custom-event on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"trigger-broad-custom-event\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[312,313,314,315,316],{"id":57,"label":58},{"id":108,"label":109},{"id":123,"label":124},{"id":154,"label":155},{"id":193,"label":194},null,"Custom event triggers fire for every instance of the event regardless of context, catching unintended events.","md",{},true,"\u002Frules\u002Ftrigger-broad-custom-event","TechArticle",{"title":5,"description":318},"rules\u002Ftrigger-broad-custom-event",false,"6S0fl_01yVGezhu9djBTxrxdV2O73mcLURhwx5VGD00",1796069484350]