I have been trying to add Google Analytics event tracking code to my Shopify Buy Now button.
It's the same format of tracking code that I've used elsewhere on links on the same page (so I know it works in theory). However, when used in the Shopify script, it's not being picked up by Google Analytics. Have Shopify blocked this on purpose?
I've put my embed code below (with some numbers removed for privacy) with the tacking code included in the link.
Patrick, a Shopify Guru here :).
What your looking for should be possible but it would require some changes to your current tracking codes. Google has a guide here that goes through some of the changes you'll need to make to track the interactions across the different domains.
Hope that helps :)
I've now implemented the correct code from Google but it's still not tracking clicks on the button from Shopify's embed code. (Other outbound text links on the same page are tracked).
I can't be the only person who wants to track clicks on my buy now button. How have others managed to make this work?