Skip to content

gtm-templates-knowit-experience/ga-eec-to-ga4-ecom-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GA Enhanced Ecommerce to GA4 Ecommerce Converter

This GTM Variable creates either GA4 Events or GA4 Ecommerce Items based on the Enhanced Ecommerce Object or Google Tag Manager Variables. You can also map/rename Product Scoped Dimensions & Metrics, and map Enhanced Ecommerce Checkout to GA4 Events like add_payment_info and add_shipping_info.

This Template is available in the Google Tag Manager Template Gallery.

Creating GA4 Ecommerce/Retail Events

Select GA4 Ecommerce Events from the GA4 Data Type settings.

You can create GA4 Events from Product Objects, Promotion Objects and Checkout Objects.

Just tick the box next to the action (ex. Purchase) that you want to create an GA4 Event from.

GA4 Checkout Events

GA4 Events for the checkout is created based on Enhanced Ecommerce Checkout Steps.

  • Check the Checkout box.
  • Add a row.
    • Select Checkout Object Type from the dropdown. It can be either Checkout or Checkout Option.
    • Select Checkout Step Number from the dropdown.
    • Then in the Checkout Event column, type in the GA4 Event corresponding to the previous settings. Ex. begin_checkout.

Events: Retail/Ecommerce

More information about Events for Retail/Ecommerce can be found here:

Depending on your Enhanced Ecommerce implementation, you may have to create several GA4 Event Variables with this template. Ex. if you in your implementation have combined both Product Detail View and Product Impressions in the same ecommerce object, then you have to create a separate Variable for Product Impression.

Creating GA4 Ecommerce Object(s)

Select GA4 Ecommerce Object from the GA4 Data Type settings.

Just tick the box next to the action (ex. Purchase) that you want to create an GA4 Ecommerce Object from.

Depending on your Enhanced Ecommerce implementation, you may have to create several GA4 Ecommerce Object Variables with this template. Ex. if you in your implementation have combined both Product Detail View and Product Impressions in the same ecommerce object, then you have to create a separate Variable for Product Impression.

Rename/map Product Scoped Dimensions & Metrics

If you have implemented Product Scoped Dimensions or Metrics, use this solution to rename them to a more meaningful GA4 parameter.

  • In the Input field*, enter the dimension or metric.
    • Ex. metric1
  • In the Item Paramenter Name field, enter the new parameter name.
    • Ex. discount

Only dimensions or metrics that are mapped will be sent to GA4 Ecommerce. This means that if you have implemented a Product Scoped Custom Dimension, and you don't want data from that dimension sent to GA4, simply don't add the dimension to the table.

Creating GA4 Ecommerce Items from GTM Variable

If you have rewritten your Enhanced Ecommerce object using ex. a Custom Javascript Variable, you can create GA4 Ecommerce Items from that Variable.

GA4 GTM Tag Settings & Triggers

GA4 GTM Tag Settings

  • You need to create at least 2 GA4 Variables with the template
    • 1 Variable for creating GA4 Ecommerce Events
    • 1 Variable for creating GA4 Ecommerce Items

If your Enhanced Ecommerce implementation have combined Enhanced Ecommerce Actions into 1 Ecommerce Object, ex. Product Detail View and Product Impressions, then you will have to create separate variables for Product Impressions.

GTM Triggers

Your should be able to reuse your existing Triggers in most cases, depending on your Enhanced Ecommerce implementation/trigger setup. But for your checkout setup, here you must probably create different Triggers for your GA4 Ecommerce Tags.

Use Preview Mode in Google Tag Manager to verify that Variables, Tags and Triggers works as intended.

GA4 GTM Tag Settings

Images of the Variable Template

GA4 Event Setup

GA4 Event Variable Settings

GA4 Ecommerce Setup

GA4 Ecommerce Object Variable Settings

About

GTM Template Variable (Web) that creates either GA4 Events or GA4 Ecommerce Objects based on the Enhanced Ecommerce Object.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages