GA4-Scripts icon indicating copy to clipboard operation
GA4-Scripts copied to clipboard

I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script.

Open headerbidding opened this issue 3 years ago • 6 comments

I currently have the GA web vitals script (see below). Should I keep it if I change over to the GA4 script? Or will that result in duplicates? www.flixxy.com


headerbidding avatar Nov 15 '22 20:11 headerbidding

I'm not sure how two different versions of the web-vitals script will work together. Using just the new one referenced in my code may still work with your GA3 code.

You could probably use my GA4 code and add in your gtag event to also send the data to GA3. I would also add 'send_to' parameters to each gtag event and specify the relevant UA-XXXX and G-XXXX so each event only goes to the correct destination.

Tiggerito avatar Nov 16 '22 11:11 Tiggerito

Hi Tony,

I managed to make it work just with your GA4 code and got the BiGQuery report, but it still did not shed any light on why my website only has poor URLs.

There is a huge difference between CrUX and web-vitals.js:

web-vitals.js with GA4 & BigQuery: CLS: 0.000 LCP: 1.81

CrUX CLS > 0.25 desktop LCP > 2.5 desktop

                                                            CLS > 0.1 mobile                LCP > 4    mobile

I am at my wits end.

Any ideas or suggestions?

Hugh

From: Tony McCreath @.*** Sent: Wednesday, November 16, 2022 6:27 AM To: Tiggerito/GA4-Scripts Cc: Flixxy; Author Subject: Re: [Tiggerito/GA4-Scripts] I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script. (Issue #2)

I'm not sure how two different versions of the web-vitals script will work together. Using just the new one referenced in my code may still work with your GA3 code.

You could probably use my GA4 code and add in your gtag event to also send the data to GA3. I would also add 'send_to' parameters to each gtag event and specify the relevant UA-XXXX and G-XXXX so each event only goes to the correct destination.

— Reply to this email directly, view it on GitHub https://github.com/Tiggerito/GA4-Scripts/issues/2#issuecomment-1316843102 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7LMIWO642JCBFHMUQT3QLWITAHRANCNFSM6AAAAAASBKWAN4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AD7LMIT5E2AQHBK36FF6XZDWITAHRA5CNFSM6AAAAAASBKWAN6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSOPVXF4.gif Message ID: @.***>

headerbidding avatar Nov 27 '22 04:11 headerbidding

I'd be suspicious of a completely zero CLS. I'd do some testing to check valid CLS values are being passed. And make sure it is not being rounded to an integer at any point.

CrUX is aggregated over 28 days and is limited to some Chrome browser users. While the script works across browsers, and can track all users, but has other limitations, like not having access inside iframes to pick up layout shifts within them. So expect some differences. Especially because the main content of your pages (a video) is inside an iframe.

Google Search Console also groups pages into what it thinks are similar pages and gives them a single score. There's a chance this may come from some poorer performing pages. Click on the errors to see more details about the pages being grouped, and sometimes you can see their individual scores.

I'm not that familiar with the report you are using. Can you dig down into data for a single page to determine things like the element chosen for LCP and CLS.

Tiggerito avatar Nov 27 '22 21:11 Tiggerito

Hi Tony,

Thank you so much for your quck reply!

All my iframes (video, thumbnails, ads) are defined by height and width and are rock solid.

I do get a CLS of 0.02 and some more beween 0.001 and 0.004.

I am tracking my most popular page https://www.flixxy.com/trumpet-solo-melissa-venema.htm which CrUX is also tracking.

There is just no way that there is any CLS of any perceptible magnitude. One would see it.

Crux also reports a TTFB of 2.5 seconds. This is obviously incorrect as well.

I have no clue as to what is going on.

Hugh

From: Tony McCreath @.*** Sent: Sunday, November 27, 2022 4:07 PM To: Tiggerito/GA4-Scripts Cc: Flixxy; Author Subject: Re: [Tiggerito/GA4-Scripts] I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script. (Issue #2)

I'd be suspicious of a completely zero CLS. I'd do some testing to check valid CLS values are being passed. And make sure it is not being rounded to an integer at any point.

CrUX is aggregated over 28 days and is limited to some Chrome browser users. While the script works across browsers, and can track all users, but has other limitations, like not having access inside iframes to pick up layout shifts within them. So expect some differences. Especially because the main content of your pages (a video) is inside an iframe.

Google Search Console also groups pages into what it thinks are similar pages and gives them a single score. There's a chance this may come from some poorer performing pages. Click on the errors to see more details about the pages being grouped, and sometimes you can see their individual scores.

I'm not that familiar with the report you are using. Can you dig down into data for a single page to determine things like the element chosen for LCP and CLS.

— Reply to this email directly, view it on GitHub https://github.com/Tiggerito/GA4-Scripts/issues/2#issuecomment-1328339999 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7LMITYTWTBT3MX7QQOAS3WKPEODANCNFSM6AAAAAASBKWAN4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AD7LMITAILYP37ECLUX2X7LWKPEODA5CNFSM6AAAAAASBKWAN6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPFTOB6.gif Message ID: @.***>

headerbidding avatar Nov 28 '22 00:11 headerbidding

It sounds like something to raise with the CrUX people.

Maybe dig into the countries people come from. It looks like experiences outside of the US are not as good.

What element is it reporting to be the main CLS cause? That’s always a good clue. Same with LCP.

-- Tony

From: Flixxy @.> Sent: Monday, 28 November 2022 11:30 AM To: Tiggerito/GA4-Scripts @.> Cc: Tony McCreath @.>; Comment @.> Subject: Re: [Tiggerito/GA4-Scripts] I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script. (Issue #2)

Hi Tony,

Thank you so much for your quck reply!

All my iframes (video, thumbnails, ads) are defined by height and width and are rock solid.

I do get a CLS of 0.02 and some more beween 0.001 and 0.004.

I am tracking my most popular page https://www.flixxy.com/trumpet-solo-melissa-venema.htm which CrUX is also tracking.

There is just no way that there is any CLS of any perceptible magnitude. One would see it.

Crux also reports a TTFB of 2.5 seconds. This is obviously incorrect as well.

I have no clue as to what is going on.

Hugh

From: Tony McCreath @.***mailto:***@***.*** Sent: Sunday, November 27, 2022 4:07 PM To: Tiggerito/GA4-Scripts Cc: Flixxy; Author Subject: Re: [Tiggerito/GA4-Scripts] I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script. (Issue #2)

I'd be suspicious of a completely zero CLS. I'd do some testing to check valid CLS values are being passed. And make sure it is not being rounded to an integer at any point.

CrUX is aggregated over 28 days and is limited to some Chrome browser users. While the script works across browsers, and can track all users, but has other limitations, like not having access inside iframes to pick up layout shifts within them. So expect some differences. Especially because the main content of your pages (a video) is inside an iframe.

Google Search Console also groups pages into what it thinks are similar pages and gives them a single score. There's a chance this may come from some poorer performing pages. Click on the errors to see more details about the pages being grouped, and sometimes you can see their individual scores.

I'm not that familiar with the report you are using. Can you dig down into data for a single page to determine things like the element chosen for LCP and CLS.

— Reply to this email directly, view it on GitHub https://github.com/Tiggerito/GA4-Scripts/issues/2#issuecomment-1328339999 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7LMITYTWTBT3MX7QQOAS3WKPEODANCNFSM6AAAAAASBKWAN4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AD7LMITAILYP37ECLUX2X7LWKPEODA5CNFSM6AAAAAASBKWAN6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPFTOB6.gif Message ID: @.***mailto:***@***.***>

— Reply to this email directly, view it on GitHubhttps://github.com/Tiggerito/GA4-Scripts/issues/2#issuecomment-1328396170, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABFXYSVRVEO6UDOT5OQI6Q3WKP7YJANCNFSM6AAAAAASBKWAN4. You are receiving this because you commented.Message ID: @.@.>>

Tiggerito avatar Nov 28 '22 02:11 Tiggerito

CLS really should not be country dependent.

The element is a txt below the video.

You are right, I will take it up with the CrUX people.

From: Tony McCreath @.*** Sent: Sunday, November 27, 2022 10:00 PM To: Tiggerito/GA4-Scripts Cc: Flixxy; Author Subject: Re: [Tiggerito/GA4-Scripts] I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script. (Issue #2)

It sounds like something to raise with the CrUX people.

Maybe dig into the countries people come from. It looks like experiences outside of the US are not as good.

What element is it reporting to be the main CLS cause? That’s always a good clue. Same with LCP.

-- Tony

From: Flixxy @.> Sent: Monday, 28 November 2022 11:30 AM To: Tiggerito/GA4-Scripts @.> Cc: Tony McCreath @.>; Comment @.> Subject: Re: [Tiggerito/GA4-Scripts] I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script. (Issue #2)

Hi Tony,

Thank you so much for your quck reply!

All my iframes (video, thumbnails, ads) are defined by height and width and are rock solid.

I do get a CLS of 0.02 and some more beween 0.001 and 0.004.

I am tracking my most popular page https://www.flixxy.com/trumpet-solo-melissa-venema.htm which CrUX is also tracking.

There is just no way that there is any CLS of any perceptible magnitude. One would see it.

Crux also reports a TTFB of 2.5 seconds. This is obviously incorrect as well.

I have no clue as to what is going on.

Hugh

From: Tony McCreath @.***mailto:***@***.*** Sent: Sunday, November 27, 2022 4:07 PM To: Tiggerito/GA4-Scripts Cc: Flixxy; Author Subject: Re: [Tiggerito/GA4-Scripts] I currently have the GA web vitals script. Should I keep it or replace it with the GA4 script. (Issue #2)

I'd be suspicious of a completely zero CLS. I'd do some testing to check valid CLS values are being passed. And make sure it is not being rounded to an integer at any point.

CrUX is aggregated over 28 days and is limited to some Chrome browser users. While the script works across browsers, and can track all users, but has other limitations, like not having access inside iframes to pick up layout shifts within them. So expect some differences. Especially because the main content of your pages (a video) is inside an iframe.

Google Search Console also groups pages into what it thinks are similar pages and gives them a single score. There's a chance this may come from some poorer performing pages. Click on the errors to see more details about the pages being grouped, and sometimes you can see their individual scores.

I'm not that familiar with the report you are using. Can you dig down into data for a single page to determine things like the element chosen for LCP and CLS.

— Reply to this email directly, view it on GitHub https://github.com/Tiggerito/GA4-Scripts/issues/2#issuecomment-1328339999 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7LMITYTWTBT3MX7QQOAS3WKPEODANCNFSM6AAAAAASBKWAN4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AD7LMITAILYP37ECLUX2X7LWKPEODA5CNFSM6AAAAAASBKWAN6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPFTOB6.gif Message ID: @.***mailto:***@***.***>

— Reply to this email directly, view it on GitHubhttps://github.com/Tiggerito/GA4-Scripts/issues/2#issuecomment-1328396170, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABFXYSVRVEO6UDOT5OQI6Q3WKP7YJANCNFSM6AAAAAASBKWAN4. You are receiving this because you commented.Message ID: @.@.>>

— Reply to this email directly, view it on GitHub https://github.com/Tiggerito/GA4-Scripts/issues/2#issuecomment-1328464506 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7LMIQRSUWVRU46RAGVMB3WKQNZNANCNFSM6AAAAAASBKWAN4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AD7LMIQKGEP7ITHB2IXNJLLWKQNZNA5CNFSM6AAAAAASBKWAN6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPF3BHU.gif Message ID: @.***>

headerbidding avatar Nov 28 '22 03:11 headerbidding