4 thoughts on “GTM: Enhanced eCommerce Tracking for Single Page Apps

  1. Chris

    Hi Jim,

    so overall: instead of using history change triggers, pageviews are hooked onto eCom-Events which makes total sense to me.

    One basic understanding I still miss:

    If the SPA is running within a traditional round-trip page, the GTM Snippet is most likely included in the head tag outside the app. Will the dataLayer payload/ecom-snippet, which is placed with a push inside the app, reach the GTM snippet outside the app?

    This is a very basic question, but sth I don’t really get.

    Thanks a lot,
    Chris

    Reply
    1. Jimalytics Post author

      Hey Chris – Depends on the context. If the dataLayer is defined anywhere on the page, it will reach GTM in some way, shape, or form. You can update the dataLayer object through the dataLayer.push() parameters like normal and choose whether you want to reset it on each virtual page load or if you want to just append more data to the object.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *