Enhanced Ecommerce to App+Web Ecommmerce GTM Setup

Google Analytics App+Web Ecommerce Purchase Tag

Since Google Analytics App+Web Ecommerce data finally are available in BigQuery, I hereby share my Google Tag Manager concept for using Google Analytics Enhanced Ecommerce implementation to track App+Web Ecommerce. This means that if you have Enhanced Ecommerce implemented, you can use this setup and send Ecommerce data to App+Web using your existing implementation.

The concept I share here can be used by everyone no matter how you have implemented Enhanced Ecommerce. The only thing you will have to adjust to your needs are the GTM Triggers for your App+Web Ecommerce Tags, but I will explain how you do that.

GTM Variables for App+Web Ecommerce

You will have to create 11 Data Layer Variables, and 7 Custom Javascript Variables in GTM for a complete setup.

Data Layer Variables

Create the Data Layer Variables shown in the table below.

Variable NameData Layer Variable NameParamenter Name or (Comment)Data Layer Version
ecom - ecommerce - DLVecommerce(Enhanced Ecommerce object)1
ecom - purchase - Id - DLVecommerce.purchase.actionField.idtransactions_id2
ecom - purchase - revenue - DLVecommerce.purchase.actionField.revenuevalue2
ecom - currency - DLVecommerce.currencycurrency2
ecom - purchase - tax - DLVecommerce.purchase.actionField.taxtax2
ecom - purchase - shipping - DLVecommerce.purchase.actionField.shippingshipping2
ecom - purchase - coupon - DLVecommerce.purchase.actionField.couponcoupon2
ecom - checkout - step - DLVecommerce.checkout.actionField.stepcheckout_step2
ecom - checkout - option - DLVecommerce.checkout.actionField.optioncheckout_option2
ecom - checkout_option - step - DLVecommerce.checkout_option.actionField.stepcheckout_step2
ecom - checkout_option - option - DLVecommerce.checkout_option.actionField.optioncheckout_option2

I’m using Data Layer Version 1 for my {{ecom – ecommerce – DLV}} Data Layer, so if you want to use Version 2 instead, you will have change some of the code in the Custom Javascript Variable {{app+web – ecom – event – checkout – CJS}}.

Custom Javascript Variables

These 7 Custom Javascript Variables are doing the “magic” here based on the Enhanced Ecommerce object. 4 variables maps the Enhanced Ecommerce object into App+Web Events for Retail/Ecommerce, and the 3 others creates new App+Web Ecommerce objects.

If you wonder why we can’t just have 1 Variable for App+Web Events, and 1 Variable for App+Web Ecommerce object, the reason is that we are creating App+Web Events based on Enhanced Ecommerce Actions from the ecommerce object. Within the ecommerce object we could have Ecommerce Actions for Promotions, Impressions and Product Detail View at the same time depending on the implementation, and I have therfor splitted them into different Variables.

If that isn’t a problem in your implementation, you can of course reduce the number of Variables. In addition, I have created 1 Variable for the 3 different Checkout Events.

Custom Javascript Variables for creating App+Web Events

Generic App+Web Events

This variable creates the following App+Web Events:

  • view_item
  • select_item
  • add_to_cart
  • remove_from_cart
  • purchase
  • refund

Name the variable app+web – ecom – event – product – CJS.

View Item List App+Web Event

This variable creates the following App+Web Event:

  • view_item_list

Name the variable app+web – ecom – event – view_item_list – CJS.

Checkout App+Web Event

This variable creates the following App+Web Events:

  • begin_checkout
  • checkout_progress
  • set_checkout_option

Name the variable app+web – ecom – event – checkout – CJS.

Promotion App+Web Events

This variable creates the following App+Web Events:

  • select_promotion
  • view_promotion

Name the variable app+web – ecom – event – promotion – CJS.

Custom Javascript Variables for creating App+Web Ecommerce objects

Generic App+Web Ecommerce object

This variable creates the App+Web Ecommerce object for the following App+Web Events:

  • view_item
  • select_item
  • add_to_cart
  • remove_from_cart
  • begin_checkout
  • checkout_progress
  • purchase
  • refund

Name the variable app+web – ecom – product – CJS.

Promotion App+Web Ecommerce object

This variable creates the App+Web Ecommerce object for the following App+Web Events:

  • select_promotion
  • view_promotion

Name the variable app+web – ecom – promotion – CJS.

View Item List App+Web Ecommerce object

This variable creates the App+Web Ecommerce object for the following App+Web Event:

  • view_item_list

Name the variable app+web – ecom – view_item_list – CJS.

GTM Triggers for App+Web Ecommerce

You can maybe reuse many of your existing Enhanced Ecommerce Triggers in GTM (depending of your implementation), but if you in your Enhanced Ecommerce implementation have very generic Triggers (like sending Ecommerce data with PageView), I recommend that you create new Triggers for App+Web Ecommerce, that only Triggers for specific App+Web Events.

In my case I have a Enhanced Ecommerce Custom Event Trigger for impressions. This Trigger is in this Enhanced Ecommerce implementation used for sending impression data both for product lists (impressions) and promotions (promoView). Since I don’t want my App+Web Promotion Impression Tag to be Triggered if the Enhanced Ecommerce object doesn’t contain promotions, I have created a custom Trigger for App+Web promotion impressions as shown below. You should be able to use the same concept for your App+Web Ecommerce custom Triggers.

GTM Tags for App+Web Ecommerce

You will have to create up to 6 different App+Web Ecommerce Tags in GTM depending on your implementation.

If you wonder why currency isn’t a Event Parameter in the setup, that is because currency is set in the Google Analytics: App+Web – Configuration Tag in my setup.

The Tags are listed in the Table below. Use the image of the App+Web Purchase Tag as a reference to the content in the table.

Tag Name Event Name Parameter NameParameter ValueApp+Web Events
GA - App+Web - Ecom - Purchase{{app+web - ecom - event - product - CJS}}transactions_id
value
tax
shipping
coupon
items
{{{ecom - purchase - Id - DLV}}
{{ecom - purchase - revenue - DLV}}
{{ecom - purchase - tax - DLV}}
{{ecom - purchase - shipping - DLV}}
{{ecom - purchase - coupon - DLV}}
{{app+web - ecom - product - CJS}}
purchase
GA - App+Web - Ecom - Checkout{{app+web - ecom - event - checkout - CJS}}checkout_step
checkout_option
items
{{ecom - checkout - step - DLV}}
{{ecom - checkout - option - DLV}}
{{app+web - ecom - product - CJS}}
checkout
GA - App+Web - Ecom - Checkout Option{{app+web - ecom - event - checkout - CJS}}checkout_step
checkout_option
{{ecom - checkout - step - DLV}}
{{ecom - checkout - option - DLV}}
set_checkout_option
GA - App+Web - Ecom - Product{{app+web - ecom - event - product - CJS}}items{{app+web - ecom - product - CJS}}add_to_cart
remove_from_cart
select_item
view_item
GA - App+Web - Ecom - View Item List{{app+web - ecom - event - view_item_list - CJS}}items{{app+web - ecom - view_item_list - CJS}}view_item_list
GA - App+Web - Ecom - Promotion{{app+web - ecom - event - promotion - CJS}}items{{app+web - ecom - promotion - CJS}}view_promotion
select_promotion

Some final words

In my existing Enhanced Ecommerce implementation, I have lot’s of Product Scoped Custom Dimensions and Metrics that I would like to send to App+Web as well, but that isn’t supported (yet).

App+Web is in beta, which we can also see in the documentation. There are conflicting/mismatching information between the GTM Implementation documentation, and the Enhanced Ecommerce migration documentation. You will find some differences in App+Web Event namings between those 2 documents. And yes, also other differences exist. In some documentation I have found an discount Item parameter, but I haven’t found discount as an Item parameter in BigQuery.

With other words, I don’t guarantee that I have everything 100% correct.

And finally, some of the concept/code in this setup is inspired by David Vallejo and his APP+WEB Enhanced Ecommerce Traspiler for GTM.

Happy analysing Google Analytics App+Web Ecommerce data based on your existing Enhanced Ecommerce implementation.

Be the first to comment on "Enhanced Ecommerce to App+Web Ecommmerce GTM Setup"

Leave a comment

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.