Hii ,
I have correctly added the measurement id in Cs cart Google analytics seetings and enable the tracking as well. The page view and the other events are tracking but not the purchase event. I have done multiple real-time payments placing the order in cs cart the purchase event is not gettings tracked neither the revenue is gettting generated.
And while going thr. the files i found one custom addon which’s also using the design\themes\abt__unitheme2\templates\addons\tbd_template_override\hooks\index\head_scripts.pre.tpl
GA4 and google ads code
i tried disabling the Cs cart addon and vice-versa so that either of them works but i didnt have tried uninstalling the addon as well.
have renamed each and every cache folder in var which gets created .
I even tried setting up the GTM config in order to findoutt he reason.
the order_confirmation.post.tpl file is correctly working i have verified the purchase event and the datalayer as well. but the purchase event is not getting tracked in GTM neither in GA4 debugView.
I then tried manually adding this in my console window and the purchase event got tracked but why the it’s not working via code.dataLayer.push({
event: ‘purchase’,
ecommerce: {
transaction_id: ‘359’,
affiliation: ‘Amar Kosa’,
value: 0.11, // Ensure this is a number
currency: ‘AED’,
items: [
{
item_id: ‘product_code_1’,
item_name: ‘Product Name 1’,
item_category: ‘Category 1’,
price: 0.11,
quantity: 1
},
{
item_id: ‘product_code_2’,
item_name: ‘Product Name 2’,
item_category: ‘Category 2’,
price: 0.22,
quantity: 2
}
]
}
});
The GA4 is getting included on every page as well. then why my purchase event is not tracking. please help me out it’s been more than 1.5 month now. and the issue is still not fixed.
Thank you