• Priority: High
  • Status: Waiting on customer
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 19.11.20, 17:00
  • Opened by: Stefano Romano

Ticket #19888 - Google Analytics 4 issue

Hello,
we released our web site with Alysum theme, but when we try to configure the Google Analytcs in Desktop and AMP site it dosen’t work, i think the actual theme dosen’t support the new Google Analytcs tag start with “G-” can you help me?
Thanks

Comments

Fred 20 Nov 2020, 13:53

Hi, Stefano.
Please fill out all necessary fields in your profile https://support.promokit.eu/index.php?do=myprofile to access to your back office and FTP

Stefano Romano 20 Nov 2020, 14:49

Updated!

Fred 21 Nov 2020, 11:20

I have checked out your website source code and see there Google Analytics code https://take.ms/lXKIw

What do you mean by it doesn't work, there is no registered visits?

Stefano Romano 21 Nov 2020, 17:27

Yes it don't register the visit, because Google Analytcs update their platform with the new code start "G-" and not with "UA-".
So it don't register the visit in Desktop site and in AMP site

Fred 22 Nov 2020, 12:02

but there is a code with "G-" prefix and not wit "UA-" https://take.ms/lXKIw

Try to reset the module

Stefano Romano 22 Nov 2020, 12:25

Yes is correct, if you open a new property on Google Analytcs you will get the New Analytcs code with "G-" prefix, but your theme dosen't support the "G-" prefix, it support only the "UA-" prefix.
So you need to update the Theme with the "G-" prefix support

Fred 22 Nov 2020, 12:37

Where did you get that the theme doesn't support "G-" prefix? see the screenshot https://take.ms/lXKIw there is the right code with G-

Stefano Romano 22 Nov 2020, 12:49

I don't receive anything from the site with this code you posted on screenshot!

The correct code i have to use in web site with the New Google Analytcs is this

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TZYCB6YL3F"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-TZYCB6YL3F');
</script>

Infact if i join in my dashboard on google analytcs i get 0 view but is false

Fred 22 Nov 2020, 12:51

That Google Analytics module is not our. We are not developers of that module.
Try to ask support of that module

Stefano Romano 22 Nov 2020, 12:57

Ok for the Google Anaytcs ok i will ask they, but for AMP Module?

Fred 22 Nov 2020, 12:58

as I can see you have disabled Google Tag Manager https://take.ms/Po6kN

Fred 22 Nov 2020, 13:01

Please also check out google's recommendations regarding the configuration https://support.google.com/tagmanager/answer/9205783?hl=en

Stefano Romano 22 Nov 2020, 13:12

I tryed to enable only the Google Tag Manager but dosen't work too.
I go off topic now: i see i have all old promokit plugin, if i replace the plugin with your new ZIP Theme File, i lost all configuration?

Stefano Romano 22 Nov 2020, 13:15

If i Enalbe only google tag manager on AMP in my console i get this error

Attachments:

Fred 23 Nov 2020, 13:23

1. if i replace the plugin with your new ZIP Theme File, i lost all configuration? - you can lost only custom CSS/JS code. In any case make a backup before the update.
2. Seems the ID is not registered in your google account. That error is generated by google scripts. Please check out carefully the link I gave you before https://support.google.com/tagmanager/answer/9205783?hl=en

Stefano Romano 23 Nov 2020, 14:30

Ok, i understand but can you explain me how i can add Google Analytcs on my website in AMP? thanks

Fred 23 Nov 2020, 15:29

I need to clarify, do you need to use Google Analytics or Google Tag Manager?

Stefano Romano 23 Nov 2020, 15:43

Yes, i need only Google Analytics

Fred 23 Nov 2020, 15:45

Ok, I'll review the code once again...

Stefano Romano 23 Nov 2020, 15:55

Ok, let me know if you need some, i'm still online here

Fred 23 Nov 2020, 16:00

I just modified the file /www.laviniamode.com/themes/alysum/templates/mobile/_partials/footer-bottom.tpl according to the Google documentation https://developers.google.com/analytics/devguides/collection/amp-analytics
But nothing is changed in the AMP page. Do you use some additional cache?

Stefano Romano 23 Nov 2020, 16:52

No, we don't have other cache

Fred 23 Nov 2020, 17:43

Ok, now I see the page was updated and new code is present in the source code. Please check out your google analytics now

Stefano Romano 24 Nov 2020, 09:56

No, it dosen't work :'(

Fred 24 Nov 2020, 11:34
Stefano Romano 24 Nov 2020, 12:25

I set only the Google Analytrcs ID on AMP Theme Settings, i don't edit any file in ftp

Fred 24 Nov 2020, 13:07

I see the following error there

Access to fetch a config from origin 'https://www.laviniamode.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin'

What means you didn't add your domain to your google settings