• Closed by: Fred
  • Closed on: 22.11.19, 11:36
  • Reason: Closed
  • Comment: Glad to help!

Ticket #15942 - Probleme tracking Google analytics with th AMP

Hello,

Do you have tutorials to set up the google analitics for the mobile version AMP.
Or some advice to give us?
Thank you for your feedback

Comments

Marek 22 Oct 2019, 10:20

you just need to add your analytics ID to the AMP settings

Vasilakis artemi 22 Oct 2019, 20:01

Hi thanks for your answer. We are using Google Tag manager to manage our google analytics. Is it possible to add it as well ? We will need as well to track all the transactions and the turnover of our shop. Could we do it as well with your amp version ?

Marek 23 Oct 2019, 11:05

I need access the the theme’s files to add it

Vasilakis artemi 23 Oct 2019, 16:00

Hello,

Find here
*updated*

Best regard
artémi

Marek 24 Oct 2019, 11:57

I just added basic setup of google tag manager into the file /themes/alysum/templates/mobile/_partials/footer-bottom.tpl please ad your ID’s there and let me know how it works

Vasilakis artemi 24 Oct 2019, 12:35

Hi,

I’ve just added my gtm id and it’s working thanks but my main concern is about the ecommerce tracking. We need to send into google analytics some info like turnover, transactions, product category sold… and in an amp version there is no data layer.

Do you know how we can do it ?

Thanks

Marek 24 Oct 2019, 19:06

I hope you understand that is not a function “out of the box”, and it should be developed. If you have a module for desktop, I could make it work for AMP faster.

Vasilakis artemi 28 Oct 2019, 16:10

Hi,

yes i made all the tracking for the desktop version with the module : “CdC Google Tag Manager E-commerce avancé” but the main problem is that an AMP version can’t manage a data layer.

this idea could be to put it in your roadmap ?

thanks

Marek 29 Oct 2019, 10:50

what data layer do you mean? could you please show it at a screenshot?

Vasilakis artemi 29 Oct 2019, 13:03

to obtain all the ecommerce data in google analytics you need normaly to set up a data layer

//zupimages.net/viewer.php

This data layer have lot of info like : price, category of the product, promotion, name of the product…

The module “CdC Google Tag Manager E-commerce avancé” make the set up of the data layer for us. But as i read in some websites, data layers are not working with an AMP version.

Marek 30 Oct 2019, 12:55

I need access to your server, for now I see only “/var/cache/prod” folder

Vasilakis artemi 31 Oct 2019, 16:56

Hi there,

Could you try again please? I tried with the infos I gave to you before and it works fine.

Marek 01 Nov 2019, 14:38

I keep seeing only “var” folder https://take.ms/CPAFe

Vasilakis artemi 01 Nov 2019, 17:57

The login are not the good ones :

Marek 02 Nov 2019, 13:43

I have researched the code of google tag manager module and figure out there is no way to use it in AMP because it use javascript what is not allowed in AMP. There is one way to use Google Tag Manager is like described in this article https://www.simoahava.com/analytics/accelerated-mobile-pages-via-google-tag-manager/#add-amp-analytics-to-your-website Unfortunately, we don’t have time right now for such custom work

Vasilakis artemi 03 Nov 2019, 14:36

thanks for your answer. I think it might be interesting for many of your customers because they might need to track if people are buying on your AMP version. For example for another of our ecommerce website we are doubting to take your theme because of this. If you had it to roadmap please let me know :) . Waiting for this we are going to look by our self if we can do something.

Marek 07 Nov 2019, 15:24

this feature is in our TODO, hope to implement it as soon as possible

Fred 19 Nov 2019, 21:06

the feature has been added and will be released soon

Vasilakis artemi 22 Nov 2019, 09:08

Hi Fred and Marek

Thanks for your answer it’s a good news :)

So you ll be able to push to google tag manager & google analytics the conversion value when a visitor is on AMP Pages ?

best regards