Checkout steps
Jurgen8en opened this issue · comments
Hi,
Thanks for the great Plugin, it worked immediately.
One thing, that I am missing is a guide how to add the checkout steps to google analytics.
'ec:setAction','checkout', {
'step': 1,
'option': 'xxx'
Hi @Jurgen8en
I am glad it works and you like it. Did you figure out your question since you closed the issue? :)
Not the best solution, but I just added this on the required pages
<script>gtag('event', 'begin_checkout');</script>
<script>gtag('event', 'checkout_progress', {"checkout_step": 1});</script>
<script>gtag('event', 'checkout_progress', {"checkout_step": 2});</script>
...
I would reopen this issue to be addressed in a proper way. I think I will be able to provide an implementation
Yes, I agree. It should be provided in the plugin
Another thing.
The purchase call should not be added to the thank-you page. It generated duplicates, and some custumers don´t wait this page to be loaded.
gtag('event', 'purchase', {"transaction_id":"...
The purchase should be called by the backoffice:
https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
if you do the purchase request on server side, you loose all the referral and UTM campaign data. and then all orders will be associated with the direct channel. you don't want that.
ok, I found another solution https://www.thyngster.com/the-definitive-approach-for-preventing-duplicate-transactions-on-google-analytics-universal-customtask (posted NOVEMBER 21, 2019)
Server side:
- It can be coupled to the right user !
// Take notice, if you want GA reports to tie this event with previous user actions
// you must get and set the same ClientId from the GA Cookie
https://github.com/theiconic/php-ga-measurement-protocol
Closing this issue since we are past this. The new branch (and soon new version) will support GA4 with the relevant events