Tracking 'cart open' in Google Analytics when using Ajax 'cart drawer'

tallhat
Visitor
2 0 0

We have a theme in play with an Ajax style "cart drawer" - i.e. clicking the cart icon/link displays an *overlay drawer* rather than going to a separate 'cart URL'. the sales people are using google analytics (GA) and are asking how they can track this 'open cart' action (goal/funnel?). any suggestions/guides for this?

they say "When setting up Goals in Google Analytics we noticed that we're unable to track when customers view their basket, as at the moment the basket appears within the same page of the site, without the url changing. The basket url would usually be https://storedomain.com/cart and I wondered if there's a way of making it so the url changes to this address when customers view their basket, so that we can track their journey a bit better?"

any thoughts on how we deal with this on the shopify/theme/GA side?

thanks

Replies 3 (3)

ChuckWatson
Excursionist
21 2 3

You would track the click event

https://developers.google.com/analytics/devguides/collection/analyticsjs/events

There's no meat in this?
tallhat
Visitor
2 0 0

thank you - how do we implement this on the shopify side?

PinkyPotions
Shopify Partner
1 0 0

Did you ever figure this out!? We have the same issue and unsure how to track add to carts for Google Ads etc.