saleor-storefront icon indicating copy to clipboard operation
saleor-storefront copied to clipboard

Add support for Google Analytics

Open Pacu2 opened this issue 5 years ago • 4 comments

We should have support for Google Analytics by default. I imagine that as data-driven e-commerce, we would like to track as much as possible, that's including:

  • [ ] Page tracking https://developers.google.com/analytics/devguides/collection/analyticsjs/pages https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications

  • [ ] All of the enhanced e-commerce https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce

This tracking should be easily expandable if, for example, I want to add some custom tracking next to Google Analytics.

Pacu2 avatar Apr 18 '19 11:04 Pacu2

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 19 '19 20:11 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 19 '20 10:01 stale[bot]

Update: Google Tag Manager is bundled with storefront and can be used if GTM_ID is set in environment. It just adds snipped to the webpage, no further integration yet.

I hope for adding enhanced ecomm in upcoming months, the idea is to make it integrated with SDK and and use lots of events. This way adjusting for other analytics will be easy to add.

krzysztofwolski avatar May 29 '20 09:05 krzysztofwolski

We should add a documentation page on how to setup GTM.

There's a chat on the topic of how to set the variable.

https://spectrum.chat/saleor/general/saleor-google-analytics-and-tag-manager~cc478ae3-afa1-4f6c-926c-05f13fd98262

null-ref-0000 avatar Jan 02 '21 03:01 null-ref-0000