Enhanced ecommerce tracking: Setup and data modeling


I’m in the middle of setting up enhanced ecommerce tracking based on my existing Google Analytics datalayer and have some questions:

  • Some ecommerce data is already available, when I send the page view hit. Does it make sense to send the data in one hit? For example page view + promo views + product views or page view + checkout steps? Of course clicks would still be separate then. Or would you rather send everything in separate hits?

I’ve found this and it looks like you are combining the data whenever the ecommerce object is available before page view?

Specifically I’m wondering how to achieve this with the new GTM templates by Simo Ahava. I believe these enforce a new hit and don’t allow to add the data to the page view?

  • This brings me to modeling: From reading some ressources, I believe for the Snowplow own ecommerce tracking it is always separate events (add to cart, transaction)? Are there any SQL examples on how to use the enhanced ecommerce tracking?

Thank you very much!

So the article is really stepping through a mapping of an advanced ecommerce implementation. It is outlining how a datalayer.push and a subsequent event with matching regex string containing ecommerce value(s), fires a tag.

The tracker/collector:

SNOWPLOW_NAME_HERE('newTracker', 'snplow1', 'MY_COLLECTOR', {
  'appId': 'snowplowweb',
  'cookieName': 'MY_COOKIE_NAME'

SNOWPLOW_NAME_HERE('enableActivityTracking', 10, 10);

However there are further ecommerce schemas being invoked for example “SNOWPLOW_NAME_HERE(‘trackEnhancedEcommerceAction’, ‘view’);”.

Conceptually how this works is a event is triggered, say “add to cart” and the associated JSON is populated and sent with associated values. This all will still adhere to the Canonical events model.

1 Like