Skip to Content
Main Content

11 Minute Read | September 16, 2024

GA4 E-Commerce Model: Implementation & Management Best Practices for Marketers

In my work with clients, I often serve as their e-commerce whisperer – getting implementations to work properly and up to spec. This is the most fun, and often the most challenging, part of my Google Analytics and Google Tag Manager work.

The GA4 e-commerce model is simple to understand, well laid out, and has clear and thorough documentation. So why is it so hard to implement and so often poorly implemented? The GA4 e-commerce model is often hard to implement for these reasons:

  • Third-party vendors not implementing all features
  • Internal developers not understanding the model
  • Re-using old code
  • Poor implementation or testing

But you can overcome these challenges. Here’s how to ensure a successful GA4 e-commerce implementation and tips for managing it effectively.

Understanding the Items Array

At the heart of the GA4 e-commerce model is the "items” array.

Items is a template for the information that describes one specific product item. The item might be a dog collar; actions around it might include viewing it, adding it to the cart, and purchasing it.

The “array” is developer-speak for “there might be more than one item.”  If you’re shopping for your dog, you may purchase a dog collar and a water dish. The corresponding items array will have two items in it.

What defines an item? Information you’d expect:

  • the item name and item ID (at least one of which is required)
  • the brand
  • the category – up to five levels deep, such as pets / dogs / small dogs / collars
  • the price
  • the quantity
  • and several other parameters that further describe that item you’re trying to sell.

Example

Let’s look at the Google documentation. This screenshot of an items array has two items in it. The same fields – item name and ID, brand, price, etc. – are formatted for and describe each item.

An example of the items array in Google Analytics 4.

Pretty straightforward – you might say it even makes sense!

Even better, the items array is extensible – you can add your own custom fields or parameters. You might want to add color or size, for example.

Any additional custom fields are called item-scoped custom dimensions. GA4 lets you add up to 10 in the free version and up to 25 for Analytics 360 properties.

(You may have heard about GA4 parameters being “scoped” – user-scoped, session-scoped, item-scoped, etc. An item-scoped parameter simply refers to one that’s within the items array. The one downside of the different scoped parameters is that you often can’t mix them in different reports or Explorations.)

Keep the items array in mind whenever you work with GA4 – it’s at the heart of every e-commerce event.

The Essential E-Commerce Events in Google Analytics

We now understand the items array, and we know it’s at the heart of the GA4 e-commerce model. The next step is to add events (actions) around it.

Google provides a well-defined list of e-commerce events. These events cover everything a user does with an item – view it, add it to the cart, remove it from the cart, view the cart, checkout, etc.

Google is strict about this list. Google will not even recognize an event as an e-commerce one unless you use Google’s name – not your own – for the event. So:

  • Don’t create your own event name (something developers love to do).
  • Don’t use an older name for that event.

For example:

  • In GA4, use “add_to_cart” as the relevant event for, umm, adding an item to a cart.
  • Don’t make up an event name and call it “add_to_shopping_basket.”
    • Google won’t recognize that event as an e-commerce one, so it won’t show up in the monetization reports in GA4.
  • Don’t use “addToCart,” which is the “old” name for that event in Universal Analytics (GA3).
    • Google won’t recognize addToCart as a GA4 e-commerce event (unless you do some fancy processing to change addToCart to add_to_cart; believe me, it’s not worth it).

Which events in Google’s GA4 e-commerce model are most important? The good news is that GA4 has a pretty good answer for that, in terms of the two funnels in GA4’s monetization reports.

The purchase journey report comprises five events. The last four are related to e-commerce (session_start is not):

  • session_start
  • view_item
  • add_to_cart
  • begin_checkout
  • purchase

A look at the e-commerce device category screen in GA4.

The checkout journey report covers two additional e-commerce steps (add shipping and add payment):

  • begin_checkout
  • add_shipping_info
  • add_payment_info
  • purchase

The checkout journey in GA4

In short, considering only the GA4 reports, Google rates these events as most important:

  • view_item
  • add_to_cart
  • begin_checkout
  • add_shipping_info
  • add_payment_info
  • purchase

Proper implementation of all six gives you a great funnel that shows your customer’s journey through your e-commerce site.

Why Is the GA4 E-Commerce Model So Difficult?

The GA4 e-commerce model is clear and simple. It provides for an understandable description of an item and a clear list of events.

The tricky part is implementing that model.

Let’s look at one common example – Shopify.

Shopify took a long time to support the GA4 model natively. Once they added support for GA4, it was for a limited set of events:

An example of GA4 events in Shopify

What’s missing? The add_shipping_info event, one of the steps in GA4’s checkout journey report!

(Note: This is from Shopify’s native GA4 support; multiple third-party plugins and apps offer much more robust GA4 integration.)

Another very popular e-commerce platform is WooCommerce, in WordPress. In that world, the GTM4WP plugin is excellent and very popular.

Unlike Shopify’s native integration, GTM4WP tracks all GA4 e-commerce events, not just the six Google identifies as the most important. For example, GTM4WP will capture a remove_from_cart event or a view_item_list (where a grid of items might appear on a page).

Real-World Implementation Challenges

If you’re running a Shopify or WooCommerce store and using one of the more popular plugins, you’re probably in good shape.

Troublesome issues around e-commerce implementation often have to do with other systems, such as:

  • e-commerce sites that use internally developed software
  • third-party vendors that offer modified e-commerce systems that are piggy-backed on to other solutions, such as CRM integration or ticket sales
  • repurposed Universal Analytics implementations squeezed into the GA4 e-commerce model.

The first two tend to be most problematic. I’ve found that the developers may understand their systems quite well, but they lack understanding of the GA4 e-commerce model.

Even with Google’s great documentation, developers often stray from the standard. They’ll use “cost” instead of “price”; “qty” instead of “quantity”; “category” instead of “item_category.”

(Pro tip: Don’t do that. Such loose terminology can lead to critical errors. Follow the documentation exactly, particularly as it applies to event names and parameter names, and things will go great.)

Even worse, many of these hybrid systems will just ask for your GA4 Measurement ID and promise to send  all the e-commerce events. Often, they’ll send just a small subset of the events, and even those may not be implemented properly.

Bottom line: Even though you’re a marketer, you may have to train the developers to implement the model correctly – which means you need to understand the model well AND know how to test the implementation.

Google Documentation: The Key to the GA4 E-Commerce Model

Marketers, if you do end up working with developers, or if you want to dive a bit deeper into the e-commerce model, bookmark the two Google resources I regularly consult.

Both reside in the “developers” subdomain of Google. As a marketer, you may be more used to the “support.google.com” subdomain. It often has great information, but it doesn’t get too technical.

The developers.google.com subdomain does get technical – sometimes very technical. But that’s not the case with the Google Analytics e-commerce pages, which are understandable for non-developers.

The first resource is the overall guide to the e-commerce model. It shows the items array and the various e-commerce events (add_to_cart, etc.)

(Note: The documentation shows different instructions for a (1) Google Tag or (2) GTM implementation. In most cases, as a marketer you don’t have to worry about which implementation to use; the items array and the event names are identical across both.)

An example of Google Analytics' e-commerce documentation

As good as this documentation is, it doesn’t describe the parameters. For example, what is the location_id in the items array?

For a description of the parameters, you need a second reference source: the list of recommended events for Google Analytics 4. This describes each parameter and indicates whether it’s required.

A list of recommended events in GA4 e-commerce documentation

Required Fields

I often see implementations fail because they don’t include the required fields. Here’s what Google requires:

For the items array:

  • item_name OR item_id (preferably both)
  • not required, but relatively meaningless without them:
    • quantity
    • price

For all GA4 e-commerce events:

  • a valid items array
  • currency
  • value
    • Value is the sum of the quantity price for each item in the items array.
    • Pro tip: Price is the amount after any discount.

For the GA4 purchase event:

  • a valid items array
  • currency
  • value
  • transaction_id (order number)

Again, these are straightforward requirements. But developers often forget to include them all or attach different names to them. The result: a broken implementation.

Testing the GA4 E-Commerce Model

I’ll end with my favorite part of the GA4 e-commerce model – how to see it in action!

Here’s an overview of one of my favorite ways to test. I’ll show you how to see the e-commerce events and whether, for example, the items array is configured correctly.

To test:

  • Have the URL of an e-commerce website ready.
  • In Chrome, open a new tab and type in tagassistant.google.com.
  • Click the Add domain button.

A Tag Assistant screen showing where to add a domain

In the box that comes up, copy, or enter the URL of the e-commerce site (from the first step, above).

The Connect Tag Assistant screen

If it all works, you should see two Chrome tabs:

  1. Tag Assistant
  2. Your e-commerce site.
    1. In my case, and in the screenshot, I’ll use a demo site where my dog Xuxa sells custom dog toys.

An example of tabs in Chrome as part of the e-commerce set up process

Move around your e-commerce site and do something e-commerce-ish – look at a product or add an item to a cart.

An image from a sample website showing e-commerce set up

Move over to the tagassistant Chrome tab.

You may see multiple Google tags, like the three in the screenshot. Choose the G-xxxxx one. This will (most likely) be a GA4 Measurement ID.

An example of the correct GA4 Measurement ID to use during e-commerce tag set up

All the events (and lots of other information) appear in the left-hand navigation. Find an example of an e-commerce event, such as the first view_item in the screenshot. Click on it.

The view_item Google tag option

Once that’s open, click on the downward chevron in the API Call section.

An example of the output of the e-commerce package in GA4

You’ll now see the output of the e-commerce package – in this case, how the e-commerce package delivers a view_item event. This information has been sent to the data layer, which is essentially a temporary storage area. Google Tag Manager can grab the information from the data layer, process it, and send it to Google Analytics 4.

Recognizing a Good Implementation

What do we see? In this case, a properly formatted view_item event!

  1. It has an items array.
    1. The items array has both an item_name and item_id (at least one of which is required).
  2. The view_item event has the required currency and value parameters.

You should be able to recognize this e-commerce event as properly formatted, based on what we covered earlier in this post.

Event: view_item in GA4

Recognizing a Garbage Implementation

What tips off an improperly formatted e-commerce event?

The add_to_cart event in the next screenshot has many flaws:

  • It has no currency or value parameters. Both are required.
  • The items array is not properly formatted.

 Google Tag Manager won’t be able to process this as a valid e-commerce event.

An image showing the add_to_cart event is missing the required currentcy and value parameters.

Testing Tips Going Forward

I’ve shown a tiny part of the testing you need to do on an e-commerce site. Play with tagassistant and an e-commerce site on your own. The beauty of tagassistant is that you can use it on any site, whether or not you have access to the analytics of that site. So play around and see how other e-commerce sites are structured. See whether they’re set up properly.

Pro tip: E-commerce implementations often fail with the add_to_cart event. Typically, a customer can add an item to a cart in three places:

  • On a view_item_list page
    • This page shows a number of products, any of which can be added to a cart.
  • On a view_item page (the product detail page)
  • In the cart itself, where the customer can often add more items.

Check out some e-commerce sites. See if they correctly deal with all three instances of the add_to_cart event. Spoiler alert: Many times they don’t.

Become an E-Commerce Whisperer Yourself

Dealing with e-commerce implementations and nuances is one of the most crucial aspects of the digital marketing world.

You too can become an e-commerce whisperer by:

  • Understanding the GA4 e-commerce model
  • Understanding the components of the items array
  • Understanding the different e-commerce events
  • Knowing what’s required at each e-commerce event
  • Knowing how to test an implementation and how to peek at how any e-commerce store is set up.

Now it’s up to you. Dive into tagassistant.google.com and start experimenting – with your own site and any other site. Explore how different sites manage common e-commerce events, such as viewing an item or adding it to the cart. Better yet, the next time you make a purchase online, track the entire process – from session_start to purchase – and see if the site is doing everything right.

Still struggling with your GA4 e-commerce implementation or best practices for management? Our expert analytics team is here to help! Watch a replay of Fred’s recent webinar, Cracking the Code of GA4 E-Commerce Tracking, for additional insights. And reach out to us anytime.

Authored By

Fred Pike

Fred Pike

Managing Director & GA/GTM Practice Lead

hand-drawn owl

Get Expert Tips

4282610/Blog/GA4-E-Commerce-Model-Implementation--Management-Best-Practices-for-Marketers11
<p style="margin-bottom:11px">In my work with clients, I often serve as their e-commerce whisperer &ndash; getting implementations to work properly and up to spec. This is the most fun, and often the most challenging, part of my Google Analytics and Google Tag Manager work.</p> <p>The GA4 e-commerce model is simple to understand, well laid out, and has clear and thorough documentation. So why is it so hard to implement and so often poorly implemented? The GA4 e-commerce model is often hard to implement for these reasons:</p> <ul> <li>Third-party vendors not implementing all features</li> <li>Internal developers not understanding the model</li> <li>Re-using old code</li> <li>Poor implementation or testing</li> </ul> <p>But you can overcome these challenges. Here&rsquo;s how to ensure a successful GA4 e-commerce implementation and tips for managing it effectively.</p> <h2>Understanding the Items Array</h2> <p style="margin-bottom:11px">At the heart of the GA4 e-commerce model is the &quot;items&rdquo; array.</p> <p>Items is a template for the information that describes one specific product item. The item might be a dog collar; actions around it might include viewing it, adding it to the cart, and purchasing it.</p> <p>The &ldquo;array&rdquo; is developer-speak for &ldquo;there might be more than one item.&rdquo;&nbsp; If you&rsquo;re shopping for your dog, you may purchase a dog collar and a water dish. The corresponding items array will have two items in it.</p> <p>What defines an item? Information you&rsquo;d expect:</p> <ul> <li>the item name and item ID (at least one of which is required)</li> <li>the brand</li> <li>the category &ndash; up to five levels deep, such as pets / dogs / small dogs / collars</li> <li>the price</li> <li>the quantity</li> <li>and several other parameters that further describe that item you&rsquo;re trying to sell.</li> </ul> <p><strong>Example</strong></p> <p>Let&rsquo;s look at the <a href="https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm)" linktype="3" target="_blank">Google documentation</a>. This screenshot of an items array has two items in it. The same fields &ndash; item name and ID, brand, price, etc. &ndash; are formatted for and describe each item.</p> <p><img alt="An example of the items array in Google Analytics 4." loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-1.jpg?Large" /></p> <p style="margin-bottom:11px">Pretty straightforward &ndash; you might say it even makes sense!</p> <p>Even better, the items array is extensible &ndash; you can add your own custom fields or parameters. You might want to add color or size, for example.</p> <p>Any additional custom fields are called <a href="https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce#:~:text=The%20items%20array%20in%20ecommerce,dimensions%20for%20Analytics%20360%20properties" linktype="3" target="_blank">item-scoped custom dimensions.</a>&nbsp;GA4 lets you add up to 10 in the free version and up to 25 for Analytics 360 properties.</p> <p style="margin-bottom:11px">(You may have heard about GA4 parameters being &ldquo;scoped&rdquo; &ndash; user-scoped, session-scoped, item-scoped, etc. An item-scoped parameter simply refers to one that&rsquo;s within the items array. The one downside of the different scoped parameters is that you often can&rsquo;t mix them in different reports or Explorations.)</p> <p>Keep the items array in mind whenever you work with GA4 &ndash; it&rsquo;s at the heart of every e-commerce event.</p> <h2 style="margin-bottom:11px">The Essential E-Commerce Events in Google Analytics</h2> <p style="margin-bottom:11px">We now understand the items array, and we know it&rsquo;s at the heart of the GA4 e-commerce model. The next step is to add <em>events</em> (actions) around it.</p> <p>Google provides a well-defined list of e-commerce events. These events cover everything a user does with an item &ndash; view it, add it to the cart, remove it from the cart, view the cart, checkout, etc.</p> <p>Google is strict about this list. Google will not even recognize an event as an e-commerce one unless you use Google&rsquo;s name &ndash; not your own &ndash; for the event. So:</p> <ul> <li>Don&rsquo;t create your own event name (something developers love to do).</li> <li>Don&rsquo;t use an older name for that event.</li> </ul> <p style="margin-bottom:11px">For example:</p> <ul> <li>In GA4, use &ldquo;add_to_cart&rdquo; as the relevant event for, umm, adding an item to a cart.</li> <li>Don&rsquo;t make up an event name and call it &ldquo;add_to_shopping_basket.&rdquo; <ul> <li>Google won&rsquo;t recognize that event as an e-commerce one, so it won&rsquo;t show up in the monetization reports in GA4.</li> </ul> </li> <li>Don&rsquo;t use &ldquo;addToCart,&rdquo; which is the &ldquo;old&rdquo; name for that event in Universal Analytics (GA3). <ul> <li>Google won&rsquo;t recognize addToCart as a GA4 e-commerce event (unless you do some fancy processing to change addToCart to add_to_cart; believe me, it&rsquo;s not worth it).</li> </ul> </li> </ul> <p>Which events in Google&rsquo;s GA4 e-commerce model are most important? The good news is that GA4 has a pretty good answer for that, in terms of the two funnels in GA4&rsquo;s monetization reports.</p> <p>The purchase journey report comprises five events. The last four are related to e-commerce (session_start is not):</p> <ul> <li>session_start</li> <li>view_item</li> <li>add_to_cart</li> <li>begin_checkout</li> <li>purchase</li> </ul> <p><img alt="A look at the e-commerce device category screen in GA4." loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-2.jpg" /></p> <p style="margin-bottom:11px">The checkout journey report covers two additional e-commerce steps (add shipping and add payment):</p> <ul> <li>begin_checkout</li> <li>add_shipping_info</li> <li>add_payment_info</li> <li>purchase</li> </ul> <p><img alt="The checkout journey in GA4" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-3.jpg" /></p> <p style="margin-bottom:11px">In short, considering only the GA4 reports, Google rates these events as most important:</p> <ul> <li>view_item</li> <li>add_to_cart</li> <li>begin_checkout</li> <li>add_shipping_info</li> <li>add_payment_info</li> <li>purchase</li> </ul> <p>Proper implementation of all six gives you a great funnel that shows your customer&rsquo;s journey through your e-commerce site.</p> <h2>Why Is the GA4 E-Commerce Model So Difficult?</h2> <p>The GA4 e-commerce model is clear and simple. It provides for an understandable description of an item and a clear list of events.</p> <p>The tricky part is implementing that model.</p> <p>Let&rsquo;s look at one common example &ndash; Shopify.</p> <p>Shopify took a long time to support the GA4 model natively. Once <a href="https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/tracking-ecommerce-events-using-analytics" linktype="3" target="_blank">they added support for GA4</a>, it was for a limited set of events:</p> <p><img alt="An example of GA4 events in Shopify" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-4.jpg" /></p> <p style="margin-bottom:11px">What&rsquo;s missing? The add_shipping_info event, one of the steps in GA4&rsquo;s checkout journey report!</p> <p style="margin-bottom:11px">(Note: This is from Shopify&rsquo;s native GA4 support; multiple third-party plugins and apps offer much more robust GA4 integration.)</p> <p>Another very popular e-commerce platform is WooCommerce, in WordPress. In that world, the <a href="https://gtm4wp.com/" linktype="3" target="_blank">GTM4WP plugin is excellent</a> and very popular.</p> <p>Unlike Shopify&rsquo;s native integration, GTM4WP tracks all GA4 e-commerce events, not just the six Google identifies as the most important. For example, GTM4WP will capture a remove_from_cart event or a view_item_list (where a grid of items might appear on a page).</p> <h2 style="margin-bottom:5px; margin-top:11px">Real-World Implementation Challenges</h2> <p>If you&rsquo;re running a Shopify or WooCommerce store and using one of the more popular plugins, you&rsquo;re probably in good shape.</p> <p>Troublesome issues around e-commerce implementation often have to do with other systems, such as:</p> <ul> <li>e-commerce sites that use internally developed software</li> <li>third-party vendors that offer modified e-commerce systems that are piggy-backed on to other solutions, such as CRM integration or ticket sales</li> <li>repurposed Universal Analytics implementations squeezed into the GA4 e-commerce model.</li> </ul> <p>The first two tend to be most problematic. I&rsquo;ve found that the developers may understand their systems quite well, but they lack understanding of the GA4 e-commerce model.</p> <p>Even with Google&rsquo;s great documentation, developers often stray from the standard. They&rsquo;ll use &ldquo;cost&rdquo; instead of &ldquo;price&rdquo;; &ldquo;qty&rdquo; instead of &ldquo;quantity&rdquo;; &ldquo;category&rdquo; instead of &ldquo;item_category.&rdquo;</p> <p>(Pro tip: Don&rsquo;t do that. Such loose terminology can lead to critical errors. Follow the documentation exactly, particularly as it applies to event names and parameter names, and things will go great.)</p> <p>Even worse, many of these hybrid systems will just ask for your GA4 Measurement ID and promise to send &nbsp;all the e-commerce events. Often, they&rsquo;ll send just a small subset of the events, and even those may not be implemented properly.</p> <p>Bottom line: Even though you&rsquo;re a marketer, you may have to train the developers to implement the model correctly &ndash; which means you need to understand the model well AND know how to test the implementation.</p> <h2 style="margin-bottom:5px; margin-top:11px">Google Documentation: The Key to the GA4 E-Commerce Model</h2> <p>Marketers, if you do end up working with developers, or if you want to dive a bit deeper into the e-commerce model, bookmark the two Google resources I regularly consult.</p> <p>Both reside in the &ldquo;developers&rdquo; subdomain of Google. As a marketer, you may be more used to the &ldquo;support.google.com&rdquo; subdomain. It often has great information, but it doesn&rsquo;t get too technical.</p> <p>The developers.google.com subdomain does get technical &ndash; sometimes very technical. But that&rsquo;s not the case with the Google Analytics e-commerce pages, which are understandable for non-developers.</p> <p>The first resource is the <a href="https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm)" linktype="3" target="_blank">overall guide to the e-commerce model</a>. It shows the items array and the various e-commerce events (add_to_cart, etc.)</p> <p>(Note: The documentation shows different instructions for a (1) Google Tag or (2) GTM implementation. In most cases, as a marketer you don&rsquo;t have to worry about which implementation to use; the items array and the event names are identical across both.)</p> <p><a href="https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm)" linktype="3" target="_blank"><img alt="An example of Google Analytics' e-commerce documentation" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-5.jpg" /></a></p> <p style="margin-bottom:11px">As good as this documentation is, it doesn&rsquo;t describe the parameters. For example, what is the location_id in the items array?</p> <p>For a description of the parameters, you need a second reference source: the <a href="https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm" linktype="3" target="_blank">list of recommended events for Google Analytics 4</a>. This describes each parameter and indicates whether it&rsquo;s required.</p> <p><a href="https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm" linktype="3" target="_blank"><img alt="A list of recommended events in GA4 e-commerce documentation" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-6.jpg" /></a></p> <h3 style="margin-bottom:5px; margin-top:11px">Required Fields</h3> <p>I often see implementations fail because they don&rsquo;t include the required fields. Here&rsquo;s what Google requires:</p> <p>For the items array:</p> <ul> <li>item_name OR item_id (preferably both)</li> <li>not required, but relatively meaningless without them: <ul> <li>quantity</li> <li>price</li> </ul> </li> </ul> <p>For all GA4 e-commerce events:</p> <ul> <li>a valid items array</li> <li>currency</li> <li>value <ul> <li>Value is the sum of the quantity price for each item in the items array.</li> <li>Pro tip: Price is the amount after any discount.</li> </ul> </li> </ul> <p>For the GA4 purchase event:</p> <ul> <li>a valid items array</li> <li>currency</li> <li>value</li> <li>transaction_id (order number)</li> </ul> <p>Again, these are straightforward requirements. But developers often forget to include them all or attach different names to them. The result: a broken implementation.</p> <h2 style="margin-bottom:5px; margin-top:11px">Testing the GA4 E-Commerce Model</h2> <p>I&rsquo;ll end with my favorite part of the GA4 e-commerce model &ndash; how to see it in action!</p> <p>Here&rsquo;s an overview of one of my favorite ways to test. I&rsquo;ll show you how to see the e-commerce events and whether, for example, the items array is configured correctly.</p> <p>To test:</p> <ul> <li>Have the URL of an e-commerce website ready.</li> <li>In Chrome, open a new tab and type in tagassistant.google.com.</li> <li>Click the Add domain button.</li> </ul> <p><img alt="A Tag Assistant screen showing where to add a domain" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-7.jpg" /><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Aptos,sans-serif"> </span></span></span></p> <p>In the box that comes up, copy, or enter the URL of the e-commerce site (from the first step, above).</p> <p style="margin-bottom:11px; margin-left:8px"><img alt="The Connect Tag Assistant screen" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-8.jpg" /></p> <p style="margin-bottom:11px">If it all works, you should see two Chrome tabs:</p> <ol> <li>Tag Assistant</li> <li>Your e-commerce site. <ol> <li>In my case, and in the screenshot, I&rsquo;ll use a demo site where my dog Xuxa sells custom dog toys.</li> </ol> </li> </ol> <p><img alt="An example of tabs in Chrome as part of the e-commerce set up process" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-9.jpg" /></p> <p style="margin-bottom:11px">Move around your e-commerce site and do something e-commerce-ish &ndash; look at a product or add an item to a cart.</p> <p style="margin-bottom:11px"><img alt="An image from a sample website showing e-commerce set up" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-10.jpg" /></p> <p style="margin-bottom:11px">Move over to the tagassistant Chrome tab.</p> <p>You may see multiple Google tags, like the three in the screenshot. Choose the G-xxxxx one. This will (most likely) be a GA4 Measurement ID.</p> <p><img alt="An example of the correct GA4 Measurement ID to use during e-commerce tag set up" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-11.jpg" /></p> <p style="margin-bottom:11px">All the events (and lots of other information) appear in the left-hand navigation. Find an example of an e-commerce event, such as the first view_item in the screenshot. Click on it.</p> <p style="margin-bottom:11px"><img alt="The view_item Google tag option" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-12.jpg" /></p> <p style="margin-bottom:11px">Once that&rsquo;s open, click on the downward chevron in the API Call section.</p> <p style="margin-bottom:11px"><img alt="An example of the output of the e-commerce package in GA4" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-13.jpg" /></p> <p style="margin-bottom:11px">You&rsquo;ll now see the output of the e-commerce package &ndash; in this case, how the e-commerce package delivers a view_item event. This information has been sent to the data layer, which is essentially a temporary storage area. Google Tag Manager can grab the information from the data layer, process it, and send it to Google Analytics 4.</p> <h2>Recognizing a Good Implementation</h2> <p>What do we see? In this case, a properly formatted view_item event!</p> <ol> <li>It has an items array. <ol> <li>The items array has both an item_name and item_id (at least one of which is required).</li> </ol> </li> <li>The view_item event has the required currency and value parameters.</li> </ol> <p>You should be able to recognize this e-commerce event as properly formatted, based on what we covered earlier in this post.</p> <p><img alt="Event: view_item in GA4" loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-14.jpg" /></p> <h2 style="margin-bottom:5px; margin-top:11px">Recognizing a Garbage Implementation</h2> <p>What tips off an improperly formatted e-commerce event?</p> <p>The add_to_cart event in the next screenshot has many flaws:</p> <ul> <li>It has no currency or value parameters. Both are required.</li> <li>The items array is not properly formatted.</li> </ul> <p>&nbsp;Google Tag Manager won&rsquo;t be able to process this as a valid e-commerce event.</p> <p><img alt="An image showing the add_to_cart event is missing the required currentcy and value parameters." loading="lazy" src="/Northwoods-2023/Blog/Article-Images/GA4-E-Commerce-15.jpg" /></p> <h3>Testing Tips Going Forward</h3> <p>I&rsquo;ve shown a tiny part of the testing you need to do on an e-commerce site. Play with tagassistant and an e-commerce site on your own. The beauty of tagassistant is that you can use it on any site, whether or not you have access to the analytics of that site. So play around and see how other e-commerce sites are structured. See whether they&rsquo;re set up properly.</p> <p>Pro tip: E-commerce implementations often fail with the add_to_cart event. Typically, a customer can add an item to a cart in three places:</p> <ul> <li>On a view_item_list page <ul> <li>This page shows a number of products, any of which can be added to a cart.</li> </ul> </li> <li>On a view_item page (the product detail page)</li> <li>In the cart itself, where the customer can often add more items.</li> </ul> <p>Check out some e-commerce sites. See if they correctly deal with all three instances of the add_to_cart event. Spoiler alert: Many times they don&rsquo;t.</p> <h2>Become an E-Commerce Whisperer Yourself</h2> <p>Dealing with e-commerce implementations and nuances is one of the most crucial aspects of the digital marketing world.</p> <p>You too can become an e-commerce whisperer by:</p> <ul> <li>Understanding the GA4 e-commerce model</li> <li>Understanding the components of the items array</li> <li>Understanding the different e-commerce events</li> <li>Knowing what&rsquo;s required at each e-commerce event</li> <li>Knowing how to test an implementation and how to peek at how any e-commerce store is set up.</li> </ul> <p>Now it&rsquo;s up to you. Dive into <a href="https://tagassistant.google.com" linktype="3" target="_blank">tagassistant.google.com</a> and start experimenting &ndash; with your own site and any other site. Explore how different sites manage common e-commerce events, such as viewing an item or adding it to the cart. Better yet, the next time you make a purchase online, track the entire process &ndash; from session_start to purchase &ndash; and see if the site is doing everything right.</p> <p><em>Still struggling with your GA4 e-commerce implementation or best practices for management? Our expert analytics team is here to help! Watch a replay of Fred&rsquo;s recent webinar, <a href="https://www.nwsdigital.com/Workshops-Recording/Cracking-the-Code-of-GA4-E-Commerce-Tracking?Occurrence=2024-07-11T10:00:00">Cracking the Code of GA4 E-Commerce Tracking</a>, for additional insights. And <a href="https://www.nwsdigital.com/Contact-Us">reach out</a> to us anytime.</em></p> <p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Aptos,sans-serif"></span></span></span></p>
/Northwoods-2020/Hero-Images/Hiker-Looking-Out-Over-Mountains.pngThe #GA4 e-commerce model is clear and simple. It provides for an understandable description of an item and a clear list of events. The tricky part is implementing that model. https://nwsdigital.me/4elDZVQ @northwoods #GoogleAnalyticsFred Pike/Northwoods-2020/People/Fred-Pike.jpgThe author standing in front of a log cabin with soft, warm lightinghttps://ctt.ac/SU741<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script><script>hbspt.forms.create({ region: "na1", portalId: "23630176", formId: "40c5bbae-05a2-42ea-94dd-1662181fd56e" });</script>/Northwoods-2023/Blog/Social-Cards/GA4-E-Commerce-Model-Implementation--Management-Best-Practices-for-Marketers---Social-Card.jpg?LargeGA4 E-Commerce Model: Implementation & Management Best Practices for Marketers2024-09-16T00:00:00/Northwoods-2023/Blog/Social-Cards/GA4-E-Commerce-Model-Implementation--Management-Best-Practices-for-Marketers---Social-Card.jpgThe GA4 e-commerce model is simple to understand, well laid out, and has clear and thorough documentation. So why is it so hard to implement and so often poorly implemented? Here's what marketers need to know.3620311/People/Fred-PikeFredPikeManaging Director & GA/GTM Practice Lead<p>Fred Pike is Northwoods&#39; resident analytics guru and a world-renowned expert in Google Analytics and Google Tag Manager. A sought-after speaker and educator, he has led courses at industry-leading conferences, events, and organizations including Conversion XL, MeasureSummit, and SuperWeek. Fred is passionate about finding the best ways to drive website traffic and understanding user interactions. He is also an accomplished pit musician and proud owner of beloved Pekingese Xuxa, one of Northwoods&rsquo; most frequent furry visitors.</p>Fred Pike/Northwoods-2020/People/Fred-Pike.jpgFred PikeAdd-In Type - NWS Data ModulesCategory - NWS Data ModulesCommittee - NWS Data ModulesDivision - NWS Data ModulesEvent Audience - NWS Data ModulesEvent Service - NWS Data ModulesEvent Type - NWS Data ModulesLocality - NWS Data ModulesModule - NWS Data ModulesNWS Data ModulesTopic - NWS Data ModulesPackage Type - NWS Data ModulesPersonID - NWS Data ModulesFred PikeProductVersion - NWS Data ModulesRecorded Webinar TopicsRegion - NWS Data ModulesSite Display - NWS Data ModulesSkillLevel - NWS Data ModulesTopic - NWS Data ModulesVideoAudience - NWS Data ModulesVideoClassification - NWS Data ModulesVideoStatus - NWS Data ModulesTeamAll StaffLeadershipAdd-In Type - NWS Data ModulesCategory - NWS Data ModulesCommittee - NWS Data ModulesDivision - NWS Data ModulesEvent Audience - NWS Data ModulesEvent Service - NWS Data ModulesEvent Type - NWS Data ModulesLocality - NWS Data ModulesModule - NWS Data ModulesNWS Data ModulesTopic - NWS Data ModulesData & AnalyticsE-CommercePackage Type - NWS Data ModulesPersonID - NWS Data ModulesFred PikeProductVersion - NWS Data ModulesRecorded Webinar TopicsRegion - NWS Data ModulesSite Display - NWS Data ModulesNWS DigitalSkillLevel - NWS Data ModulesTopic - NWS Data ModulesVideoAudience - NWS Data ModulesVideoClassification - NWS Data ModulesVideoStatus - NWS Data Modules02024-09-16T07:23:47.58300