Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Author « Topic »  

midvalleydrifter001
Ecommerce Template Expert

USA
912 Posts

Posted - 11/22/2021 :  22:32:32  
I've updated to v7.4.5 and implemented the new GA4 analytics code on all my pages.

https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=114351

I'm seeing data on all pages but I'm not getting anything on revenue.

Is there something else I need to add to my thanks.php page to work with the new GA4 format?

Do we still need to reference $usegoogleuniversal=true; in the vsadmin/includes file?

Patrick

Vince
Administrator

42464 Posts

Posted - 11/23/2021 :  04:09:21  
Hi Patrick
You don't need the $usegoogleuniversal or any of the previous code. So you're seeing data in the Real Time section? Is it maybe just a case of waiting 24 hours for the revenue section report?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

midvalleydrifter001
Ecommerce Template Expert

USA
912 Posts

Posted - 11/23/2021 :  08:52:24  
I just eliminated the $usegoogleuniversal=true; feature from my includes file.

I also noticed I had some OLD code at the bottom of my thanks.php page... and have eliminated that as well.

Yes... I see data in the Real Time section. The GA4 version has been running for 3 days now. Maybe the other code I had on the thanks page was causing the problem.

I'll give is another day or two and see if it corrects itself.

Patrick

midvalleydrifter001
Ecommerce Template Expert

USA
912 Posts

Posted - 11/23/2021 :  21:25:15  
Well... with GA4 you have to create an "Event" to track sales.

I read through all their instructions and I have no idea how to do this.

I only have 2 degrees... I guess I need another one to understand this. LOL

Has anybody set theirs up to track sales or know how to setup the "Events"?

Patrick

1818charlie
ECT Moderator

United Kingdom
1179 Posts

Posted - 11/24/2021 :  01:36:12  
Hi Patrick

I may as well pitch this link & apologies if this is what you have previously read. Approx 2/3rds down the page is how to create an event

https://support.google.com/analytics/answer/10085872?hl=en#zippy=%2Cin-this-article

Steve
Bolton Lancashire

Vince
Administrator

42464 Posts

Posted - 11/24/2021 :  01:59:21  
But hold on, you don't need to do that as it's already done for you by the cart. Can you try this, go through a test order and when you get to the thanks page, do a "view source" and at the bottom of the receipt there should be the code for the Analytics. If you search for "gtag(" then that should take you to where this is produced. Then can you copy when is in that <script> tag to my email (vince AT ecommercetemplates DOT com) and I'll take a look.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

midvalleydrifter001
Ecommerce Template Expert

USA
912 Posts

Posted - 11/24/2021 :  16:42:20  
Email sent

Vince
Administrator

42464 Posts

Posted - 11/25/2021 :  00:06:15  
Hi Patrick
You are not getting the events (product listings, product detail views, cart steps) generated on any of the pages. I don't think you have the GA4 tag set in the admin main settings page. There are more details here but it's the same one you used when adding the code to the template head section...
https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=114351

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

midvalleydrifter001
Ecommerce Template Expert

USA
912 Posts

Posted - 11/25/2021 :  10:41:36  
I added the GA4 tag in my admin settings page and ran a test order.

All looks good I assume. This is what showed up on the thanks page source code.

<script>gtag("event","purchase",{ currency:"USD",value:9.95,shipping:0,tax:0,items:[{item_id:'ShotgunBoreCleaner',item_name:'Shotgun Chamber Cleaning Tool',index:1,item_category:'Gun Cleaning',price:9.95}]});</script>

Vince
Administrator

42464 Posts

Posted - 11/25/2021 :  13:00:51  
Hi Patrick
Yes, that's looking better and sales should start to show up now.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000