[{"data":1,"prerenderedAt":432},["ShallowReactive",2],{"rule-ga4-ecommerce-missing-params":3},{"id":4,"title":5,"body":6,"breadcrumb":395,"coderail":402,"dateModified":421,"datePublished":421,"description":422,"extension":423,"meta":424,"navigation":425,"next":421,"path":426,"prev":421,"schemaType":427,"seo":428,"stem":429,"wide":430,"__hash__":431},"docs\u002Frules\u002Fga4-ecommerce-missing-params.md","Purchase event missing required parameters",{"type":7,"value":8,"toc":387},"minimark",[9,16,65,70,101,105,121,125,247,251,293,297,355,359,383],[10,11,12],"p",{},[13,14,15],"strong",{},"Summary",[17,18,19,30,47,53,59],"ul",{},[20,21,22,25,26],"li",{},[13,23,24],{},"rule_id"," — ",[27,28,29],"code",{},"ga4-ecommerce-missing-params",[20,31,32,35,36,39,40,43,44],{},[13,33,34],{},"purpose"," — Detect GA4 purchase event tags missing one or more of ",[27,37,38],{},"transaction_id",", ",[27,41,42],{},"value",", or ",[27,45,46],{},"currency",[20,48,49,52],{},[13,50,51],{},"effect"," — GA4 reports $0 revenue and cannot deduplicate transactions",[20,54,55,58],{},[13,56,57],{},"layer"," — container",[20,60,61,64],{},[13,62,63],{},"reversibility"," — non-destructive",[66,67,69],"h2",{"id":68},"what-fires-this","What fires this",[10,71,72,73,76,77,80,81,84,85,88,89,92,93,39,95,97,98,100],{},"The rule calls ",[27,74,75],{},"getGA4EventTags"," and filters to tags where ",[27,78,79],{},"ga4.eventName"," is ",[27,82,83],{},"purchase"," (case-insensitive). Tags where ",[27,86,87],{},"ga4.sendEcommerceData"," is enabled are excluded — that setting forwards the ecommerce object from the dataLayer directly, so parameter-level checking does not apply. For the remaining purchase tags, the rule inspects ",[27,90,91],{},"ga4.eventParameters"," and checks whether ",[27,94,38],{},[27,96,42],{},", and ",[27,99,46],{}," each appear by name. Any tag missing one or more of those parameters is flagged with a list of which are absent. Paused tags are not evaluated.",[66,102,104],{"id":103},"why-it-matters","Why it matters",[10,106,107,108,110,111,113,114,116,117,120],{},"GA4 requires all three parameters to produce usable ecommerce data. Without ",[27,109,38],{},", GA4 cannot deduplicate events — a page refresh on the confirmation screen logs a second purchase. Without ",[27,112,42],{}," and ",[27,115,46],{},", every transaction appears as $0 in Revenue, LTV, and Monetization reports. The data loss is silent: the tag fires, the hit is accepted, and no error surfaces in GA4 until someone inspects the reports. ",[27,118,119],{},"items"," is additionally required for product-level reporting, but the three checked here are the minimum for any revenue figure to appear.",[66,122,124],{"id":123},"example","Before \u002F after",[126,127,128,195],"compare",{},[129,130,132],"compare-col",{"label":131},"Before — flagged",[133,134,139],"pre",{"className":135,"code":136,"language":137,"meta":138,"style":138},"language-js shiki shiki-themes github-light github-dark","\u002F\u002F Purchase tag event parameters — value and currency absent\ndataLayer.push({\n  event: 'purchase',\n  transaction_id: order.id\n  \u002F\u002F value and currency not mapped\n})\n","js","",[27,140,141,150,164,177,183,189],{"__ignoreMap":138},[142,143,146],"span",{"class":144,"line":145},"line",1,[142,147,149],{"class":148},"sJ8bj","\u002F\u002F Purchase tag event parameters — value and currency absent\n",[142,151,153,157,161],{"class":144,"line":152},2,[142,154,156],{"class":155},"sVt8B","dataLayer.",[142,158,160],{"class":159},"sScJk","push",[142,162,163],{"class":155},"({\n",[142,165,167,170,174],{"class":144,"line":166},3,[142,168,169],{"class":155},"  event: ",[142,171,173],{"class":172},"sZZnC","'purchase'",[142,175,176],{"class":155},",\n",[142,178,180],{"class":144,"line":179},4,[142,181,182],{"class":155},"  transaction_id: order.id\n",[142,184,186],{"class":144,"line":185},5,[142,187,188],{"class":148},"  \u002F\u002F value and currency not mapped\n",[142,190,192],{"class":144,"line":191},6,[142,193,194],{"class":155},"})\n",[129,196,198],{"label":197},"After — fixed",[133,199,201],{"className":135,"code":200,"language":137,"meta":138,"style":138},"\u002F\u002F All three required parameters present\ndataLayer.push({\n  event: 'purchase',\n  transaction_id: order.id,\n  value: order.total,\n  currency: 'USD'\n})\n",[27,202,203,208,216,224,229,234,242],{"__ignoreMap":138},[142,204,205],{"class":144,"line":145},[142,206,207],{"class":148},"\u002F\u002F All three required parameters present\n",[142,209,210,212,214],{"class":144,"line":152},[142,211,156],{"class":155},[142,213,160],{"class":159},[142,215,163],{"class":155},[142,217,218,220,222],{"class":144,"line":166},[142,219,169],{"class":155},[142,221,173],{"class":172},[142,223,176],{"class":155},[142,225,226],{"class":144,"line":179},[142,227,228],{"class":155},"  transaction_id: order.id,\n",[142,230,231],{"class":144,"line":185},[142,232,233],{"class":155},"  value: order.total,\n",[142,235,236,239],{"class":144,"line":191},[142,237,238],{"class":155},"  currency: ",[142,240,241],{"class":172},"'USD'\n",[142,243,245],{"class":144,"line":244},7,[142,246,194],{"class":155},[66,248,250],{"id":249},"remediation","Remediation",[252,253,254,257,271,281,284,290],"ol",{},[20,255,256],{},"Open each flagged purchase event tag and note which parameters are listed as missing.",[20,258,259,260,39,262,97,264,266,267,270],{},"Locate where ",[27,261,38],{},[27,263,42],{},[27,265,46],{}," are available on the order confirmation page — typically in the order object or the ",[27,268,269],{},"ecommerce"," dataLayer push.",[20,272,273,274,39,277,280],{},"Create GTM Data Layer Variables for any missing dynamic values (e.g., ",[27,275,276],{},"ecommerce.value",[27,278,279],{},"ecommerce.currency",").",[20,282,283],{},"Add each variable as an event parameter in the purchase tag.",[20,285,286,287,289],{},"Alternatively, enable \"Send Ecommerce Data\" in the tag if the site already pushes a correctly structured ",[27,288,269],{}," object to the dataLayer on confirmation.",[20,291,292],{},"Verify in GTM Preview and GA4 DebugView that purchase hits include all three parameters with non-zero values.",[66,294,296],{"id":295},"metadata","Metadata",[298,299,302,303,308,302,312,316,302,319,323,302,326,329,302,332,336,302,339,343,302,349,352],"dl",{"className":300},[301],"spec-list","\n  ",[304,305,307],"dt",{"id":306},"severity","Severity",[309,310,311],"dd",{},"critical",[304,313,315],{"id":314},"tier","Tier",[309,317,318],{},"warning",[304,320,322],{"id":321},"category","Category",[309,324,325],{},"ga4",[304,327,328],{"id":57},"Layer",[309,330,331],{},"container",[304,333,335],{"id":334},"version","Version",[309,337,338],{},"1",[304,340,342],{"id":341},"effort","Effort",[309,344,345,348],{},[27,346,347],{},"15min"," (about 15 minutes)",[304,350,351],{"id":63},"Reversibility",[309,353,354],{},"non-destructive",[66,356,358],{"id":357},"see-also","See also",[17,360,361,369,376],{},[20,362,363,368],{},[364,365,367],"a",{"href":366},"\u002Fcategories\u002Fga4\u002F","GA4 rules"," — other rules in this category",[20,370,371,375],{},[364,372,374],{"href":373},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,377,378,382],{},[364,379,381],{"href":380},"\u002Frules\u002F","Rules catalog"," — browse all rules",[384,385,386],"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);}",{"title":138,"searchDepth":152,"depth":152,"links":388},[389,390,391,392,393,394],{"id":68,"depth":152,"text":69},{"id":103,"depth":152,"text":104},{"id":123,"depth":152,"text":124},{"id":249,"depth":152,"text":250},{"id":295,"depth":152,"text":296},{"id":357,"depth":152,"text":358},[396,399,401],{"label":397,"href":398},"API Reference","\u002F",{"label":400,"href":380},"Rules",{"label":29},{"cards":403,"onpage":415},[404],{"title":405,"tabs":406},"Evaluate",[407,411],{"label":408,"language":409,"code":410},"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-ecommerce-missing-params\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":412,"language":413,"code":414},"MCP","text","User: Run ga4-ecommerce-missing-params on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"ga4-ecommerce-missing-params\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[416,417,418,419,420],{"id":68,"label":69},{"id":103,"label":104},{"id":123,"label":124},{"id":249,"label":250},{"id":295,"label":296},null,"Purchase event missing transaction_id, value, or currency — required for revenue reporting in GA4.","md",{},true,"\u002Frules\u002Fga4-ecommerce-missing-params","TechArticle",{"title":5,"description":422},"rules\u002Fga4-ecommerce-missing-params",false,"Tvh8R1B2uOeH9AlNEoEdocD3KmxxexyOmoPc28038H8",1796069483672]