GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

Understanding Google Analytics 4 ecommerce tracking

In this article, I am going to show you how to set up ecommerce tracking in Google Analytics 4 (GA4) using Google Tag Manager (GTM).

With Google Analytics 4 properties, ecommerce implementation is a bit different compared to the legacy version, also known as Universal Analytics. I recommend following the developer’s documentation Ecommerce (GA4) Developer Guide alongside this article.

If we compare Google Analytics 4 vs Universal Analytics there are a few similarities and differences, as below.

1) Schema changes

While setting up the ecommerce events we need to pass the different schemas like product details, currency, promotions, etc.

Just to give you an example, earlier in Universal Analytics if we wanted to pass product name, we used to pass it using ‘name’ but in the case of GA4 it is just ‘item_name’.

Another example, if you wanted to measure a promotion (when a user clicks on any promotion link), in universal analytics we use to pass this using ‘promoClick’ but in the case of GA4, it has now changed to ‘select_promotion’.

The table below will provide you with details on the different schemas and changes.

NoGoogle
Analytics 4
Universal AnalyticsDescription
1view_promotionpromoViewWhen a user views a promotion
2select_promotionpromoClickWhen a user clicks on a promotion
3view_item_listimpressionsView of product impressions in a list
4select_itemproductClickClick on a product
5view_itemdetailView product details
6add_to_cartaddToCartAdd product to cart
7add_to_wishlistN/AAdd product to a wishlist
8remove_from_cartremoveFromCartRemove product from the cart
9view_cartN/AView shopping cart
10begin_checkoutcheckoutInitiate the checkout process
11add_shipping_infocheckout_optionAdd shipping info during the checkout
12add_payment_infocheckout_optionAdd payment info during the checkout
13purchasepurchasePurchase product
14refundrefundRefund product
15item_ididProduct ID / SKU
16item_namenameName of the product
17item_list_namelistProduct list name
18item_list_idN/AProduct list identifier
19indexpositionProduct position in the list
20item_brandbrandProduct brand
21item_categorycategoryProduct category
22item_category_2categoryProduct category 2nd level
23item_category_3categoryProduct category 3rd level
24item_category_4categoryProduct category 4th level
25item_category_5categoryProduct category 5th level
26item_variantvariantProduct variant name or description
27affiliationN/AThe store affiliation
28discountN/AAny discount on product
29couponcouponCoupon code used
30pricepriceProduct price
31currencyN/AUser currency
32quantityquantityProduct quantity
33promotion_ididPromotion ID
34promotion_namenamePromotion name
35transaction_ididUnique ID for the transaction required for purchase and refund events
36valuerevenueProduct revenue
37shippingshippingShipping charges for selected product in cart
38payment_typeoptionThe payment method sent with add_payment_info

2) Data layer implementation

You might be thinking to update your data layer according to the new schemas, but wait!

If you are using Universal Analytics for your ecommerce website do not update your current setup.

The reason behind this is the new schemas are not backwards compatible and hence can break your current (Universal Analytics) setup.

The good news is that for the majority of the schemas they are forward compatible and Google will translate your Universal Analytics events to the GA4 App + Web custom events.

The best thing to do to keep both versions of analytics active and running is to update your current setup to add GA4 App + Web specific dataLayer and schemas along with current schemas. This way it won’t break your Universal Analytics and the GA4 App + Web will also have its required schemas.

Now let’s get started with setting up ecommerce tracking in Google Analytics 4

Setting up ecommerce tracking in Google Analytics 4 using Google Tag Manager

Note: Ecommerce events can be also implemented using global site tag (gtag.js). In our case, we will be using Google Tag Manager.

While implementing the ecommerce tracking, we need to define or modify our DataLayer on the page and this needs development work to update the values.

If you are not familiar with the dev work you can ask your developer to carry out DataLayer implementation. Once the DataLayer is defined you can configure the DataLayer variable in GTM.

Follow the below steps to create an ecommerce DataLayer variable.

Step 1: Log in to your Google Tag Manager console and click on ‘Variables’ in the left-hand side menu.

gtm ecommerce tracking variables menu

Step 2: Click on ‘New’.

gtm ecommerce tracking new

Step 3: Give a proper name to your variable and click on ‘Variable Configuration’.

gtm ecommerce tracking variable config

Step 4: An overlay will appear like below. Select the Data Layer variable.

gtm ecommerce tracking variable type

Step 5: Variable configuration will open like below. Type ‘ecommerce.items’ as the Data Layer variable name.

gtm ecommerce tracking data layer name

Step 6: Click on ‘Save’.

gtm ecommerce tracking save

Since our Data Layer variable is configured, we can proceed with implementing ecommerce events. We will be measuring the standard ecommerce events.

The below section will provide you details of DataLayer code, GTM tag configuration and trigger condition.

1. Product/item list views/impressions

This event will measure product impressions. We need to fire this tag on the pages where a list of products is displayed, generally on the home page, category pages, etc.

DataLayer configuration:

To measure item list views/impressions, we need to push a list of products and their attributes to the data layer and pass a ‘view_item_list’ event along with that data.

// Measure product views / impressions

dataLayer.push({

'event': 'view_item_list',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'item_list_name': 'Search Results',     // Product List Name - Type: string

'item_list_id': 'SR12',                        // Product List ID - Type: string

'index': 1,                               // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, the next step is to configure your tag. Follow the below steps to configure.

Step 1: Log in to your Google Tag Manager console and click on ‘Tags’ in the left-hand side menu.

gtm ecommerce tracking tags menu

Step 2: Click on ‘New’ to create a new scroll event tag for the GA4 property.

gtm ecommerce tracking new button

Step 3: Give a proper name to your tag and click on ‘Tag Configuration’.

gtm ecommerce tracking tag configuration

Step 4: An overlay will appear on the right-hand side with a list of tag templates. Select ‘Google Analytics: GA4 Event’.

gtm ecommerce tracking tag templates

Step 5: Tag configuration window will open like below. Click on ‘Select Configuration Tag’.

gtm ecommerce tracking config tag

Step 6: A drop-down menu will appear. You can either select your pageview tag or ‘None- Manually Set ID’ from the drop-down. In our case, we will select  ‘None- Manually Set ID’.

gtm ecommerce tracking manually set id

Step 7: The next step is to enter the GA measurement ID in the input box.

You can find your measurement ID in the admin section under ‘Data Streams’.

Web Stream details 3
gtm ecommerce tracking measurement id

Step 8: Specify the name of the event. The event name you provide here will appear in your GA4 analytics reporting. Now give an event name as ‘view_item_list’.

gtm ecommerce tracking event name

Step 9: Click on the ‘Event Parameters’ drop-down menu:

gtm ecommerce tracking events paramters

Step 10: Click on the ‘Add Row’ button:

gtm ecommerce tracking save row

You should now see the two new text boxes: ‘Parameter Name’ and ‘Value’.

gtm ecommerce tracking event param

Step 11: Type ‘items’ in the ‘Parameter Name’ text box.

gtm ecommerce tracking param name

Step 12: Click on the ‘+’ button under the ‘Value’ text box:

gtm ecommerce tracking param value

Step 13: An overlay will appear like below. Select the ‘GA 4 Ecommerce DataLayer’ variable. This is the same variable that we created earlier.

gtm ecommerce tracking variables

Step 14: Your tag configuration will appear like below.

gtm ecommerce tracking tag congigu

It’s done! Now let’s set up the trigger configuration.

Trigger Configuration:

Step 15: Click anywhere under ‘Triggering’.

gtm ecommerce tracking triggering

Step 16: An overlay will appear like below. Click on the ‘+’ icon to add a new trigger.

gtm ecommerce tracking new trigger

Step 17: Give a proper name to your trigger and click anywhere in ‘Trigger Configuration’.

gtm ecommerce tracking trigger name

Step 18: An overlay will appear like below. Select ‘Custom Event’ from the list.

gtm ecommerce tracking custom event

Step 19: ‘Trigger Configuration’ will open. In the input box, we need to provide the event name. In this event, it is ‘view_item_list’ since we are measuring product impressions. Type ‘view_item_list’ In the event name.

gtm ecommerce tracking trigger event name

Step 20: Click on ‘Save’.

gtm ecommerce tracking save

Your complete tag will look like below.

gtm ecommerce tracking complete tag

Congratulations!!! You have successfully created your first ecommerce event for your GA4 property. Now let’s do this for the remaining ecommerce events.

Since I already showed you the step-by-step method to create it in the above event, for the other events I will now only show you the DataLayer code, and final tag configuration and trigger configuration.

2. Product/item list clicks

DataLayer configuration:

To measure product clicks, we need to push the product and its attributes to the data layer and pass a ‘select_item’ event along with that data.

// Measure product Clicks

dataLayer.push({

'event': 'select_item',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'item_list_name': 'Search Results',     // Product List Name - Type: string

'item_list_id': 'SR12',                        // Product List ID - Type: string

'index': 1,                               // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 Event
  • Event name: select_item
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking ga event

Trigger configuration:

You can create a trigger with the below configuration

  • Trigger type: Custom event
  • Trigger condition: event equals ‘select_item’
gtm ecommerce tracking trigger config

3. Product/item detail views

To measure product views, we need to push the product and its attributes to the data layer and pass a ‘view_item’ event along with that data.

// Measure Product Detail View

dataLayer.push({

'event': 'view_item',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'item_list_name': 'Search Results',     // Product List Name - Type: string

'item_list_id': 'SR12',                        // Product List ID - Type: string

'index': 1,                               // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 Event
  • Event name: view_item
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking google tag config

Trigger configuration:

You can create a trigger with the below configuration

  • Trigger type: Custom event
  • Trigger condition: event equals ‘view_item
gtm ecommerce tracking trigger config2

4. Add to cart

To measure add to cart, we need to push the product and its attributes to the data layer and pass a ‘view_item’ event along with that data.

// Measure Add to Cart

dataLayer.push({

'event': ' add_to_cart',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'item_list_name': 'Search Results',     // Product List Name - Type: string

'item_list_id': 'SR12',                        // Product List ID - Type: string

'index': 1,                               // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 event
  • Event name: add_to_cart
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking addtocart config

Trigger configuration:

You can create a trigger with the below configuration

  • Trigger type: Custom event
  • Trigger condition: event equals ‘add_to_cart’
gtm ecommerce tracking addtocart trigger

5. Remove from cart

To measure remove from cart, we need to push a product and its attributes to the data layer and pass a ‘remove_from_cart’ event along with that data.

// Measure Remove From Cart

dataLayer.push({

'event': ' remove_from_cart',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'item_list_name': 'Search Results',     // Product List Name - Type: string

'item_list_id': 'SR12',                        // Product List ID - Type: string

'index': 1,                               // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 event
  • Event name: remove_from_cart
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking removecart config

Trigger configuration:

You can create a trigger with the below configuration.

  • Trigger type: Custom event
  • Trigger condition: event equals ‘remove_from_cart’
gtm ecommerce tracking removecart trigger

6. Promotion views/impressions

You can measure both impressions and clicks on internal site promotions. These promotions include banners displayed on the site or an offer for free shipping.

To measure promotion view details, we need to push the product and its attributes to the data layer and pass a ‘view_promotion’ event along with that data.

// Measure promotion views/impressions

dataLayer.push({

'event': 'view_promotion',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'promotion_id': 'abc123',                   // Promotion Campaign ID - Type: Srting

'promotion_name': 'summer_promo', // Promotion Campaign Name - Type: Srting

'creative_name': 'instore_suummer',  // Promotion Creative Name - Type: Srting

'creative_slot': '1',                   // Promotion Creative Slot - Type: Numeric

'location_id': 'hero_banner',              // Promotion Location - Type: Srting

'index': 1,                                // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 event
  • Event name: view_promotion
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
Google Analytics 4 Ecommerce Tracking

Trigger configuration:

You can create a trigger with the below configuration

  • Trigger type: Custom event
  • Trigger condition: event equals ‘view_promotion’
gtm ecommerce tracking promo trigger

7. Promotion clicks

To measure promotion clicks details, we need to push the product and its attributes to the data layer and pass a ‘select_promotion’ event along with that data.

// Measure promotion Clicks

dataLayer.push({

'event': ' select_promotion ',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'promotion_id': 'abc123',                   // Promotion Campaign ID - Type: Srting

'promotion_name': 'summer_promo', // Promotion Campaign Name - Type: Srting

'creative_name': 'instore_suummer',  // Promotion Creative Name - Type: Srting

'creative_slot': '1',                   // Promotion Creative Slot - Type: Numeric

'location_id': 'hero_banner',              // Promotion Location - Type: Srting

'index': 1,                               // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 Event
  • Event name: select_promotion
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking promotion config

Trigger configuration:

You can create a trigger with the below configuration

  • Trigger type: Custom event
  • Trigger condition: event equals ‘select_promotion’
gtm ecommerce tracking promotion trigger

8. Checkouts

To measure checkout activity details, we need to push a product and its attributes to the data layer and pass a ‘begin_checkout’ event along with that data.

// Measure a Checkout

dataLayer.push({

'event': ' begin_checkout',

'ecommerce': {

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'index': 1,                               // Product List Position - Type: Numeric

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below

  • Tag type: GA4 event
  • Event name: begin_checkout
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking checkout config

Trigger configuration:

You can create a trigger with the below configuration.

  • Trigger type: Custom event
  • Trigger condition: event equals ‘begin_checkout’
gtm ecommerce tracking checkout trigger

9. Purchases

To measure purchases, we need to push transactions, products and their attributes to the data layer and pass a ‘purchase’ event along with that data on thank you page.

// Measure purchases

dataLayer.push({

'event': 'purchase',

'ecommerce': {

'purchase': {

'transaction_id': 'T12345',                  // Transaction ID- Type: String

'affiliation': 'Online Store',                 // Affliation - Type: String

'value': '35.25',                                  // Product Price- Type: Numeric

'tax': '4.90',                              // Taxes If applicable- Type: Numeric

'shipping': '5.99',                      // Shipping Charges- Type: Numeric

'currency': 'EUR',                     // Currency- Type: Numeric

'coupon': 'SUMMER_SALE',                      // Coupan Code if applicable- Type: String

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                       // Product ID/SKU- Type: String

'price': '35.25',                     // Product price - Type: numeric

'item_brand': 'Your Brand Name',           //Product brand - Type: string

'item_category': 'Category Name',     // Product category Main - Type: string

'item_category_2': 'Category level1', // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2', // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3', // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',          // Variant of the product like color, size etc - Type: string

'quantity': '1'                                     // Product quantity - Type: numeric

}]

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 event
  • Event name: purchase
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking purchase tag

Trigger configuration:

You can create a trigger with the below configuration.

  • Trigger type: Custom event
  • Trigger condition: event equals ‘purchase’
gtm ecommerce tracking purchase trigger

10. Refunds

To measure refunds, we need to push transaction details to the data layer and pass a ‘refund’ event along with that data onto the thank you page.

// Measure Refunds

dataLayer.push({

'event': 'refund',

'ecommerce': {

'transaction_id': 'T12345',                  // Transaction ID- Type: String

}

});

Google tag configuration:

Once the above code is pushed to the DataLayer, you can configure your Google Tag Manager tag like below.

  • Tag type: GA4 Event
  • Event name: refund
  • Event parameter (name – value): ‘items’ – {{Ecommerce Items}}
  • Variable type: data layer variable – ‘ecommerce.items’
gtm ecommerce tracking refund config

Trigger configuration:

You can create trigger with the below configuration

  • Trigger type: Custom event
  • Trigger condition: event equals ‘refund’
gtm ecommerce tracking refund trigger

In the case that you want to measure a partial refund, you can also pass a list of products with their attributes as below.

// Measure Refunds

dataLayer.push({

'event': 'refund',

'ecommerce': {

'transaction_id': 'T12345',             // Transaction ID- Type: String

'items': [

{

'item_name': 'Sample Product 1',       // Product Name- Type: String

'item_id': '123456',                   // Product ID/SKU- Type: String

'price': '35.25',                // Product price - Type: numeric

'item_brand': 'Your Brand Name',       //Product brand - Type: string

'item_category': 'Category Name', // Product category Main - Type: string

'item_category_2': 'Category level1',      // Product category (Mens, Kids) - Type: string

'item_category_3': 'Category level2',      // Product category (Shirts, Shoes) - Type: string

'item_category_4': 'Category level3',      // Product category (T-shirt, Sport Shoes) - Type: string

'item_variant': 'Variant',               // Variant of the product like color, size etc - Type: string

'quantity': '1'                                // Product quantity - Type: numeric

}]

}

});

The rest of the Google Tag Manager configuration and trigger configuration will remain the same.

So, that is how you can set up ecommerce tracking in Google Analytics 4.

Ecommerce reporting in GA4

Now since you have completed the ecommerce set up for your GA4 property, you can wait for some time to generate the data and then proceed with reporting interface.

To view ecommerce reports for your GA4 property you can click on ‘Monetization’ in the reporting menu.

monetization

Then click on ‘Monetization Overview’.

monetization overview

You will get to see below trends and tables providing details like ‘Total Revenue’, ‘Total Buyers’ and ‘Avg. purchase revenue per user’.

gtm ecommerce tracking trends

If you want a more detailed report you can click on ‘Ecommerce Purchases’ in the reporting menu.

ecommerce purchase

You will get a detailed report like below.

gtm ecommerce tracking detailed report
gtm ecommerce tracking ecommerce purchases chart
gtm ecommerce tracking table

You can also check the funnel report in the ‘Analysis’ tab by defining the funnel steps.

Note: You need to create a funnel in the analysis hub. If you are new and don’t know how to use exploration reports and funnel reports, you can check this to understand more: How to Use the Exploration Report

gtm ecommerce tracking exploration report

This is how you can set up ecommerce tracking in a Google Analytics 4 property.

#1 GA4 Intro

  1. What is GA4 (Google Analytics 4) – The Apps + Web Property?
  2. Key Benefits of Using Google Analytics 4 (GA4)
  3. How to upgrade to GA4 (Google Analytics 4)
  4. Google Analytics 4 (GA4) vs Universal Analytics – What is the difference?
  5. Google Signals GA4 – See demographics (gender, age) in Google Analytics 4
  6. Understanding Google Analytics Measurement ID (GA4)
  7. Google Analytics 4 training and tutorial
  8. Using the GA4 test property

#2 GA4 Integration

  1. How to connect GA4 (Google Analytics 4) with Google Data Studio
  2. How to link GA4 (Google Analytics 4) with Google Ads
  3. GA4 BigQuery – Connect Google Analytics 4 with BigQuery

#3 GA4 Events

  1. GA4 (Google Analytics 4) Event Tracking Setup Tutorial
  2. How to set up GA4 Custom Events via Google Tag Manager
  3. GA4 (Google Analytics 4) Enhanced Measurement Tracking Tutorial
  4. Events Report in Google Analytics 4 (GA4)
  5. GA4 User Properties (User Scoped Custom Dimensions) – Tutorial
  6. Event Scoped Custom Dimensions in GA4 – Tutorial

#4 GA4 Conversions

  1. GA4 (Google Analytics 4) Conversion Tracking Guide
  2. How to import conversions from GA4 property to your Google Ads account

#5 GA4 Dimensions and Metrics

  1. GA4 Metrics Tutorial with Free Google Analytics 4 Ebook
  2. GA4 Custom Metrics Tutorial
  3. GA4 Dimensions Tutorial
  4. GA4 Custom Dimensions Tutorial

#6 GA4 Ecommerce

  1. GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

#7 GA4 Specialized Tracking

  1. Cross Domain Tracking in GA4 (Google Analytics 4) Setup Guide
  2. GA4 Site Search – Tracking Site Search in Google Analytics 4
  3. GA4 (Google Analytics 4) Scroll Tracking Tutorial
  4. How to Install Google Analytics 4 on Shopify
  5. Self-referral Google Analytics 4 – Referral exclusion GA4
  6. GA4 Data Import Tutorial

#8 GA4 filters

  1. GA4 filters – Understanding data filters in Google Analytics 4
  2. How to create and test filters in Google Analytics 4 (GA4)?
  3. Exclude internal traffic in GA4 (Google Analytics 4) via IP filter

#9 GA4 Analysis Hub

  1. Analysis Hub Google Analytics – Exploration Report in GA4 (Google Analytics 4)
  2. How to use the user lifetime report in Google Analytics 4 (GA4)
  3. How to use path analysis report in Google Analytics 4 (GA4)
  4. How to use Segment Overlap Report in Google Analytics 4 (GA4)
  5. How to use the Funnel Analysis Report in Google Analytics 4 (GA4)

#10 GA4 Advanced

  1. How to use Debug View report in Google Analytics 4 (GA4)
  2. Understanding GA4 measurement protocol
  3. How to create a remarketing audience in Google Analytics 4 (GA4)
  4. GA4 Audiences – Creating custom audience in Google Analytics 4
  5. How to build comparison (Advanced segment) in Google Analytics 4 (GA4)

#11 GA4 Reporting

  1. How to create custom insights in Google Analytics 4 (GA4)

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade
error: Alert: Content is protected !!