[{"data":1,"prerenderedAt":280},["ShallowReactive",2],{"rule-ga4-event-name-length":3},{"id":4,"title":5,"body":6,"breadcrumb":244,"coderail":251,"dateModified":269,"datePublished":269,"description":270,"extension":271,"meta":272,"navigation":273,"next":269,"path":274,"prev":269,"schemaType":275,"seo":276,"stem":277,"wide":278,"__hash__":279},"docs\u002Frules\u002Fga4-event-name-length.md","Event names exceed 40-character limit",{"type":7,"value":8,"toc":235},"minimark",[9,16,54,59,78,82,93,97,123,127,145,149,207,211],[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-length",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect GA4 event names longer than 40 characters",[20,37,38,41],{},[13,39,40],{},"effect"," — GA4 silently truncates the name, potentially merging distinct events into a single record",[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],{},"The rule calls ",[27,63,64],{},"getGA4EventTags(data)"," to collect all active GA4 event tags, then filters to those where ",[27,67,68],{},"t.ga4.eventName"," exists and its ",[27,71,72],{},".length"," exceeds 40. Each tag over the threshold appears in the issue payload with its tag ID, tag name, event name, and character count. Paused tags are excluded by ",[27,75,76],{},"getGA4EventTags",".",[55,79,81],{"id":80},"why-it-matters","Why it matters",[10,83,84,85,88,89,92],{},"GA4 enforces a 40-character maximum on event names with no warning. Any name exceeding that limit is silently truncated at the collection boundary. Two distinct events — ",[27,86,87],{},"download_whitepaper_product_brochure_2024"," and ",[27,90,91],{},"download_whitepaper_product_brochure_2025"," — truncate to the same string and become indistinguishable in reports. GTM (Google Tag Manager) Preview mode shows the full name; GA4 DebugView shows the truncated version. Conversion events with colliding names lose attribution accuracy.",[55,94,96],{"id":95},"example","Before \u002F after",[98,99,100,114],"compare",{},[101,102,104],"compare-col",{"label":103},"Before — flagged",[105,106,112],"pre",{"className":107,"code":109,"language":110,"meta":111},[108],"language-text","Event name (44 chars):\n  download_whitepaper_product_brochure_2024\n\nEvent name (44 chars):\n  download_whitepaper_product_brochure_2025\n\nBoth truncate to the same 40-char string.\nGA4 merges them into one event.\n","text","",[27,113,109],{"__ignoreMap":111},[101,115,117],{"label":116},"After — fixed",[105,118,121],{"className":119,"code":120,"language":110,"meta":111},[108],"Event name (28 chars):\n  download_brochure_2024\n\nEvent name (28 chars):\n  download_brochure_2025\n\nEach name is distinct and under the limit.\nGA4 records them separately.\n",[27,122,120],{"__ignoreMap":111},[55,124,126],{"id":125},"remediation","Remediation",[128,129,130,133,136,139,142],"ol",{},[20,131,132],{},"Open each flagged GA4 event tag in GTM — the issue payload lists tag ID, event name, and character count.",[20,134,135],{},"Shorten the event name to 40 characters or fewer, using abbreviations or moving detail into a parameter.",[20,137,138],{},"Confirm the shortened name is unique across all other GA4 event tags in the container.",[20,140,141],{},"Update any Custom Event triggers and GA4 conversion definitions that reference the old name.",[20,143,144],{},"Publish the container and verify the event appears correctly in GA4 DebugView.",[55,146,148],{"id":147},"metadata","Metadata",[150,151,154,155,160,154,164,168,154,171,175,154,178,181,154,184,188,154,191,195,154,201,204],"dl",{"className":152},[153],"spec-list","\n  ",[156,157,159],"dt",{"id":158},"severity","Severity",[161,162,163],"dd",{},"high",[156,165,167],{"id":166},"tier","Tier",[161,169,170],{},"optimization",[156,172,174],{"id":173},"category","Category",[161,176,177],{},"ga4",[156,179,180],{"id":46},"Layer",[161,182,183],{},"container",[156,185,187],{"id":186},"version","Version",[161,189,190],{},"1",[156,192,194],{"id":193},"effort","Effort",[161,196,197,200],{},[27,198,199],{},"15min"," (about 15 minutes)",[156,202,203],{"id":52},"Reversibility",[161,205,206],{},"non-destructive",[55,208,210],{"id":209},"see-also","See also",[17,212,213,221,228],{},[20,214,215,220],{},[216,217,219],"a",{"href":218},"\u002Fcategories\u002Fga4\u002F","GA4 rules"," — other rules in this category",[20,222,223,227],{},[216,224,226],{"href":225},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,229,230,234],{},[216,231,233],{"href":232},"\u002Frules\u002F","Rules catalog"," — browse all rules",{"title":111,"searchDepth":236,"depth":236,"links":237},2,[238,239,240,241,242,243],{"id":57,"depth":236,"text":58},{"id":80,"depth":236,"text":81},{"id":95,"depth":236,"text":96},{"id":125,"depth":236,"text":126},{"id":147,"depth":236,"text":148},{"id":209,"depth":236,"text":210},[245,248,250],{"label":246,"href":247},"API Reference","\u002F",{"label":249,"href":232},"Rules",{"label":29},{"cards":252,"onpage":263},[253],{"title":254,"tabs":255},"Evaluate",[256,260],{"label":257,"language":258,"code":259},"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-length\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":261,"language":110,"code":262},"MCP","User: Run ga4-event-name-length on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"ga4-event-name-length\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[264,265,266,267,268],{"id":57,"label":58},{"id":80,"label":81},{"id":95,"label":96},{"id":125,"label":126},{"id":147,"label":148},null,"Event names longer than 40 characters are silently truncated by GA4, potentially merging distinct events.","md",{},true,"\u002Frules\u002Fga4-event-name-length","TechArticle",{"title":5,"description":270},"rules\u002Fga4-event-name-length",false,"xX1mhS3GSboY3sR27MO13WsPPvvR7n5-R6j6Hk-TSGo",1796069483761]