[{"data":1,"prerenderedAt":340},["ShallowReactive",2],{"rule-ga4-event-name-proliferation":3},{"id":4,"title":5,"body":6,"breadcrumb":303,"coderail":310,"dateModified":329,"datePublished":329,"description":330,"extension":331,"meta":332,"navigation":333,"next":329,"path":334,"prev":329,"schemaType":335,"seo":336,"stem":337,"wide":338,"__hash__":339},"docs\u002Frules\u002Fga4-event-name-proliferation.md","Similar event name proliferation",{"type":7,"value":8,"toc":293},"minimark",[9,16,54,59,96,100,121,125,172,176,203,207,265,269],[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-event-name-proliferation",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect groups of GA4 event names that share a common prefix and differ only by a trailing suffix",[20,37,38,41],{},[13,39,40],{},"effect"," — Each distinct event name occupies one of GA4's 500 custom event slots; similar events inflate that count unnecessarily",[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,81,82,85,86,77,89,77,92,95],{},"The rule collects all active GA4 event tags via ",[27,63,64],{},"getGA4EventTags()"," and reads each tag's ",[27,67,68],{},"ga4.eventName"," field. Names that start with ",[27,71,72],{},"{{"," (variable placeholders) are skipped. Remaining names are grouped by prefix: a prefix is everything up to the final underscore-delimited segment. Names with fewer than three segments are not grouped, so GA4's own two-part events such as ",[27,75,76],{},"view_item",", ",[27,79,80],{},"view_cart"," and ",[27,83,84],{},"view_promotion"," never form a group. When three or more distinct event names share the same prefix — for example, ",[27,87,88],{},"button_click_header",[27,90,91],{},"button_click_footer",[27,93,94],{},"button_click_nav"," — the rule fires. All tags contributing to a proliferating group are returned as affected items; duplicate tag IDs across groups are deduplicated.",[55,97,99],{"id":98},"why-it-matters","Why it matters",[10,101,102,103,77,106,77,109,112,113,116,117,120],{},"GA4 enforces a limit of 500 custom event names per property. Each suffix variant counts as a separate slot. Three events that differ only in context — ",[27,104,105],{},"signup_email",[27,107,108],{},"signup_google",[27,110,111],{},"signup_apple"," — consume three slots that a single ",[27,114,115],{},"signup"," event with a ",[27,118,119],{},"signup_type"," parameter would cover with one. At scale, slot exhaustion blocks new events from registering. GA4 drops the events silently with no in-app warning.",[55,122,124],{"id":123},"example","Before \u002F after",[126,127,128,144],"compare",{},[129,130,132,141],"compare-col",{"label":131},"Before — proliferation",[10,133,134,135,77,137,77,139],{},"Container sends three separate events:\n",[27,136,88],{},[27,138,91],{},[27,140,94],{},[10,142,143],{},"Each is a distinct GA4 event tag firing on its own trigger.\nThree event name slots consumed for one logical action.",[129,145,147,154],{"label":146},"After — consolidated",[10,148,149,150,153],{},"One ",[27,151,152],{},"button_click"," event tag fires across all triggers.",[10,155,156,157,160,161,77,164,167,168,171],{},"A ",[27,158,159],{},"button_location"," parameter is set to ",[27,162,163],{},"header",[27,165,166],{},"footer",", or ",[27,169,170],{},"nav","\nvia a GTM variable. One slot consumed; full context preserved.",[55,173,175],{"id":174},"remediation","Remediation",[177,178,179,182,185,191,194,197,200],"ol",{},[20,180,181],{},"Review the flagged prefix groups and the event names within each group.",[20,183,184],{},"Determine whether the variants represent different actions or the same action in different contexts.",[20,186,187,188,190],{},"For same-action groups: choose a consolidated event name (the shared prefix) and a distinguishing parameter name (e.g., ",[27,189,159],{},").",[20,192,193],{},"Update each GTM tag in the group: set the event name to the consolidated name and add the context value as an event parameter.",[20,195,196],{},"Update any Custom Event triggers that match the old variant names to use the consolidated event name.",[20,198,199],{},"Remove the now-redundant event tags from the container.",[20,201,202],{},"Verify in GA4 DebugView that the parameter value arrives correctly for each context.",[55,204,206],{"id":205},"metadata","Metadata",[208,209,212,213,218,212,222,226,212,229,233,212,236,239,212,242,246,212,249,253,212,259,262],"dl",{"className":210},[211],"spec-list","\n  ",[214,215,217],"dt",{"id":216},"severity","Severity",[219,220,221],"dd",{},"medium",[214,223,225],{"id":224},"tier","Tier",[219,227,228],{},"info",[214,230,232],{"id":231},"category","Category",[219,234,235],{},"ga4",[214,237,238],{"id":46},"Layer",[219,240,241],{},"container",[214,243,245],{"id":244},"version","Version",[219,247,248],{},"1",[214,250,252],{"id":251},"effort","Effort",[219,254,255,258],{},[27,256,257],{},"strategic"," (no fixed time; needs a plan)",[214,260,261],{"id":52},"Reversibility",[219,263,264],{},"non-destructive",[55,266,268],{"id":267},"see-also","See also",[17,270,271,279,286],{},[20,272,273,278],{},[274,275,277],"a",{"href":276},"\u002Fcategories\u002Fga4\u002F","GA4 rules"," — other rules in this category",[20,280,281,285],{},[274,282,284],{"href":283},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,287,288,292],{},[274,289,291],{"href":290},"\u002Frules\u002F","Rules catalog"," — browse all rules",{"title":294,"searchDepth":295,"depth":295,"links":296},"",2,[297,298,299,300,301,302],{"id":57,"depth":295,"text":58},{"id":98,"depth":295,"text":99},{"id":123,"depth":295,"text":124},{"id":174,"depth":295,"text":175},{"id":205,"depth":295,"text":206},{"id":267,"depth":295,"text":268},[304,307,309],{"label":305,"href":306},"API Reference","\u002F",{"label":308,"href":290},"Rules",{"label":29},{"cards":311,"onpage":323},[312],{"title":313,"tabs":314},"Evaluate",[315,319],{"label":316,"language":317,"code":318},"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-event-name-proliferation\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":320,"language":321,"code":322},"MCP","text","User: Run ga4-event-name-proliferation on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"ga4-event-name-proliferation\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[324,325,326,327,328],{"id":57,"label":58},{"id":98,"label":99},{"id":123,"label":124},{"id":174,"label":175},{"id":205,"label":206},null,"Similar events that differ only by suffix could be consolidated (e.g., button_click_header, button_click_footer).","md",{},true,"\u002Frules\u002Fga4-event-name-proliferation","TechArticle",{"title":5,"description":330},"rules\u002Fga4-event-name-proliferation",false,"DhmwGAYq3SG3cxbB_nHdZpQKSC2PZwJeopW-92QqIoE",1796069483767]