Google Analytics Premium feature

Necessary fix in Google Analytics enhanced e-commerce

Business summary: It's necessary to preserve information about product being in checkout to prevent "Product checkout" metric being heavily distorted.

When Google almost three years ago launched enhanced e-commerce all the analysts including me were by full right in heaven. The idea of it is truly amazing and by couple more lines of code gives you powerful data to analyze your product performance. And here comes a slightly tricky part not mentioned in official guidelines.

Expectation

Enhanced e-commerce should also allow us to create the whole product funnel from the first impression to product purchases. In ideal world we expect for particular product something like this:

Simple buying behaviour funnel

Caveat:

This would happen if users could add product into cart only at product detail page and we would have one-step checkout process.

If we skip fact that, depending on the business type, there naturally can be more adds to cart than product details views. E.g. on food e-shop we probably don't need to go to product detail do add 1 kg of potatoes into cart :). On the other hand if we want to buy expensive coat it's more likely that we'll add in from product detail page.

Reality

This is the current state in vast majority of e-shops where enhanced e-commerce is implemented. Try to look into yours and see how it looks.

Funnel reality

It's very likely that for lots of products you'll see more product checkouts than adds to cart. Yes, it doesn't make much sense. It shouldn't be possible to have product in checkout without adding it. There is an exception when an e-shop has abandoned checkout recreation mostly by e-mail, but it definitely doesn't distort data that much. As Simo Ahava mentioned in one of his great posts almost all of enhanced e-commerce features are hit level interactions. That's exactly what makes the funnel looks so.

Kudos to Google who provided us its merchandise store Google Analytics account for free, so we can learn from it. Even there it works the way described above :).

Imagine user enters checkout, then goes to second step checkout a gets back to the first one. Google Analytics takes the data into Product Checkout metric just from the first step. In this case you send the data twice. That's what you probably don't what to do. Of course, it's possible to calculate the checkout loss from Add-to-detail and Buy-to-detail rate, but I'll write about it next time. Example from Google Merchandise store:

Google Analytics merchandise store

Solution

Two workarounds are possible. Either way it's necessary to preserve information about product being in checkout and send it to Google Analytics just once per session per product. It possible to do it in Google Tag Manager and bit of playing with 1st party cookie, javascript and both firing and exception triggers. The second one is to do the same thing but instead of GTM magic, do it all backend side and push only what is necessary into data layer. It's up to you which one is more comfortable.

Happy implementation fixing :)

Related posts: