- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Fred
- Private: No
- Open Date: 03.06.21, 18:09
- Opened by: Riccardo Sala
- Closed by: Anonymous Submitter
- Closed on:
- Reason: Not a bug
Ticket #21619 - AMP Google Analytics Ecommerce data
Hello,
It looks the tracking is working correctly for navigation, but eCommerce data from AMP pages is not working.
Today We have received two order, both not tracked.
By analysing visited page I can state for sure, both order has come from Mobile version.
What’s wrong in my configuration?
Comments
Hi, Riccardo Sala.
AMP require it own analytics configuration
Did you configured your google account according to the tutorials here?
https://developers.google.com/analytics/devguides/collection/amp-analytics/
https://www.youtube.com/watch?v=QXu-z9mz0z8
Haven’t you embedded events directly on the code?
I thought adding the property in theme AMP settings was already configured to send events, and not only page view
We have added only basic events for google analytics (gtag).
You can see that in the file /themes/alysum/templates/mobile/_partials/footer-bottom.tpl
So, all implementation is required?
Have you prepared something to import in Google Tag Manager?
Google Tag Manager has external config, you just need to add into your google tag ID in to the AMP settings.
The config will be taken remotely with the link
Can you provide custom Paid implementation?
But implementation of what? If you want to connect tag manager, just put your ID into the AMP settings
Already done, but only pageview are recorded.
Ecommerce data and events (like add to cart, remove from cart, begin checkout, purchase and purchase amount) are missing.
I just added events for Add to cart button and an event to Payment confirmation button into the file
Please check it out and modify it as you need.
And what about ecommerce order amount?
I didn’t find an example/tutorial how to add that
I’ve found this interesting guide.
You can find some example of json and how to implement.
It should be a great improvement for your theme.
https://www.tagmanageritalia.it/come-tracciare-le-commerce-avanzato-eec-di-google-analytics-nelle-pagine-amp/#gref
<script async custom-element=”amp-analytics” src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js“></script>
<amp-analytics type=”googleanalytics”>
<script type=”application/json”>
{
}
</script>
</amp-analytics>
Thank you for the suggestion.
Do you want to have these extra parameters for the “pageview” event?
As you can see in the guide at link https://www.tagmanageritalia.it/come-tracciare-le-commerce-avanzato-eec-di-google-analytics-nelle-pagine-amp/#gref
It’s possibile to implement ecommerce data by using extraparameters
I hope you can translate/read the page I’ve linked to perform the implementation
Ecommerce data tracking is fundamental for optimizing Google Ads campaigns.
So we prepared following config with extra params: