Zen Cart Logo
Forums / All Other Contributions/Addons / GA-4 Analytics [Support Thread]

GA-4 Analytics [Support Thread]

Views: 300,449

Results 21 to 40 of 61
25 Jun 2023, 11:38 AM
#21
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,695
Plugin Contributions:
56

GA-4 Analytics [Support Thread]

@GordoTheFlash Check with your hoster. The time varies between "instantaneous" and "you must wait for a migration to another server."
Also, double check after some time has passed because you may be looking at a cached page.

27 Jun 2023, 10:02 PM
#22
techiant avatar

techiant

New Zenner

Join Date:
Oct 2008
Posts:
82
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

I get that but my question is, is there a way to insert a new GA4 analytics code somewhere into the header file? I mean it's just a Javascript tracking code. Why is there a necessity for a plug in?

27 Jun 2023, 10:05 PM
#23
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

Techiant:

I get that but my question is, is there a way to insert a new GA4 analytics code somewhere into the header file? I mean it's just a Javascript tracking code. Why is there a necessity for a plug in?
It depends on whether you want 'basic' tracking (i.e. page-traversal) or the 'ecommerce' events (someone added something to the cart or completed checkout).

If it's only 'basic' tracking, then just add the Google-recommended javascript to your template's html_header.php file; if you want the 'ecommerce' events, you'll need the plugin.

28 Jun 2023, 9:56 AM
#24
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

I would like to incorperate full ecommerce tracking so I was looking at this plugin, However the site already uses google tag manager and the documentation implies that it should really be one or the other and not both.

Should I be looking how to add the ecommerce tracking into tag manager or is it plausible to still install the plugin?

Thanks!

28 Jun 2023, 12:27 PM
#25
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

DannyVarley:

I would like to incorperate full ecommerce tracking so I was looking at this plugin, However the site already uses google tag manager and the documentation implies that it should really be one or the other and not both.

Should I be looking how to add the ecommerce tracking into tag manager or is it plausible to still install the plugin?

Thanks!
The GA-4 Analytics plugin and be used in either *GTM *or GA-4 mode, depending on the type of Google Marketing ID with which you configure the plugin. If you've already got Google Tag Manager in use, then that should be removed prior to installation so that you don't get (at best) double-reporting of information or (at worst) Google "mad" at you.

I am not a Google Management Console user, but there's some magic that one must do to use a GTM- Marketing ID with GA-4; something about connecting the G- (GA-4) Marketing ID to its GTM- sibling.

2 Aug 2023, 2:14 AM
#26
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

Zen Cart 1.5.7C
Bootstrap Template 3.5.3
GA4 Analytics
GA4 Measuring ID

I'm getting slower checkout times as google Analytics is sending data to Google.. I get the spinning time tool and I can count to 10 sometimes while it's sending data to google. Is there a way to speed this up?

Website
https://www.gulfstatessupply.com

Thanks!

2 Aug 2023, 2:55 AM
#27
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

brian70809:

Zen Cart 1.5.7C
Bootstrap Template 3.5.3
GA4 Analytics
GA4 Measuring ID

I'm getting slower checkout times as google Analytics is sending data to Google.. I get the spinning time tool and I can count to 10 sometimes while it's sending data to google. Is there a way to speed this up?

Website
www.gulfstatessupply.com

Thanks!
What's "GA4 Measuring ID"?

3 Aug 2023, 12:31 AM
#28
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

G-HCMMH1HEVY

vs the UA that is no longer supposed to be used.

3 Aug 2023, 12:50 PM
#29
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

Perhaps a "preconnect" to Google's tag manager would help. See this link for additional information.

Try adding this just after the <head> tag in the site's template's html_header.php:

<link href="https://www.googletagmanager.com" rel="preconnect" crossorigin>

FWIW, I saw no noticeable lag in the pages' display on the site.

4 Aug 2023, 2:47 AM
#30
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

I'll do what you posted.. It's only during checkout...

I use OPC with Bootstrap and the circle of time spins for about 10 seconds while someone checks out. With or without Credit Card, it's the same time.

I'll update after I put this line in.

4 Aug 2023, 3:07 AM
#31
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

It didn't fix the delay on checkout.. I tried changing to basic Template, Responsive Template, and back to Bootstrap.. used OPC and took OPC off.

I am thinking it may be a slow database issue. I'll do some homework and get back to this.

4 Aug 2023, 3:31 AM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

brian70809:

It didn't fix the delay on checkout.. I tried changing to basic Template, Responsive Template, and back to Bootstrap.. used OPC and took OPC off.

I am thinking it may be a slow database issue. I'll do some homework and get back to this.
The checkout-delay is normally (both OPC and not) dependent on the number of external shipping modules (e.g. USPS, UPS, FedEx) the store uses. Each transition (for 3-page checkout) or page-refresh (for OPC) during the checkout process normally requires a poll of all enabled shipping methods.

23 Oct 2023, 12:37 AM
#33
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

v1.2.3 of GA4 Analytics is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2368

This release contains changes associated with the following GitHub issues:

#13: Need to really load after currencies are instantiated.
#22: $_SERVER['REFERER'] might not be set on checkout payment/confirmation pages, generating logs.
#23: Page performance, push all GA4 configuration parameters via a single dataLayer.push.

5 Apr 2024, 10:24 PM
#34
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

v1.2.4 of GA4 Analytics is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2368

This release no longer includes blank categories' names in a product's categories-list; see GitHub issue #24 for more information.

19 Jul 2024, 4:06 PM
#35
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
365
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

I have some silly questions regarding this plug-in and adwords conversion tracking.

In the readme guide of this plug-in, it is said: "Make sure that you did not add some Google tracking scripts anywhere manually in your Zen Cart files."

So I need to remove all the GA/GA4 and conversion related code from my site at first, then install the plug-in. After that, how can I track the conversion? Only rely on the data from GA4? What is the best way to track the conversion (adwords) and analyze the site (GA4) at the same time?

As a background, my site is current using the following code to track the conversion. I used to use google tag manager but it seems it cannot get the order amount. This following code can report the order amount properly.

https://docs.zen-cart.com/user/analytics/analytics_services/#google-adwords-conversion-tracking

19 Jul 2024, 5:24 PM
#36
chuckphillips avatar

chuckphillips

Zen Follower

Join Date:
Sep 2012
Location:
Upstate South Carolina
Posts:
106
Plugin Contributions:
1

Re: GA-4 Analytics [Support Thread]

That's what I did - remove all older tracking code, install GA4, then modify your Adwords Goal to use GA4 conversion data

Attachment 20710

19 Jul 2024, 7:39 PM
#37
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
365
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

ChuckPhillips:

That's what I did - remove all older tracking code, install GA4, then modify your Adwords Goal to use GA4 conversion data

Attachment 20710

Thanks for sharing your idea. I will try your way then.

2 Dec 2024, 3:16 AM
#38
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: GA-4 Analytics [Support Thread]

Nothing wrong with the plugin except for page speed complaining of blocking time:

/gtag/js?id=G-JQL28SP4BW(https://www.googletagmanager.com) Main-Thread Blocking Time : 537 ms

URL

Google Tag Manager /gtag/js?id=G-JQL28SP4BW(https://www.googletagmanager.com)

Total CPU Time 1,563 ms

Script Evaluation 1,276 ms

Script Parse 276 ms

Is there away to reduce it? I am getting a score of 50 for mobile on pagespeed!

Thank you

18 Jan 2025, 5:21 PM
#39
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

v2.0.0 of GA4 Analytics is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2368

This version is released as a Zen Cart encapsulated plugin, supporting Zen Cart versions 2.1.0 and later. Thanks to @DrByte for doing the conversion to encapsulated.

13 Feb 2025, 2:05 PM
#40
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: GA-4 Analytics [Support Thread]

v2.0.1 of GA4 Analytics is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2368

This version correctly update various configuration settings when upgrading from a non-encapsulated version of the plugin (#28).