Enhanced Ecommerce: Keys To Accurate Data

For eCommerce brands, tracking website actions is a critical part of successful marketing and sales. Google Analytics offers an enhanced eCommerce plugin that provides a holistic view of all the actions on your site, including how users browse your products online, and the steps they take that ultimately lead to conversion.  

Enhanced Ecommerce vs. Standard Ecommerce Plugin

Google Analytics offers two ways to track your sales data: standard eCommerce tracking, and enhanced eCommerce tracking. 

Standard tracking allows you to track sales through one or two final pages a user sees after completing a purchase- such as an order confirmation page or thank you page. On the other hand, enhanced eCommerce tracking allows you to evaluate the customer journey to purchase at multiple touchpoints, such as adding items to a cart, or entering billing and credit card information. The enhanced eCommerce plugin also allows you to understand reports on each product you sell, and helps you discover where users decide not to follow through with their purchase.  

In addition, clean data and accurate tracking provide the best actionable insights for your brand, especially when you need to understand if the overall customer experience on your site drives users to purchase. More importantly, bugs and errors from incorrect implementation can cause issues that skew your measurement and may drive you to make incorrect conclusions about the customer journey. 

Therefore, it’s essential to check your Google Analytics profile, and verify that data correctly pushes through to the dataLayer when you implement the plugin. After that,, make sure that the data meets your general expectations. If there are any significant surprises, you’ll likely see an error and need to dig deeper to figure out the cause.

So what should you do if you think there’s an error and you might be dealing with erroneous data? Let’s walk through some of the most common errors and how to fix your eCommerce plugin implementation when something goes wrong. Note that we focus on implementation based on Google Tag Manager, since it actively uses dataLayer.  

Error #1: HTTP Request Limit exceeded (aka Payload size is too large)

This error can appear even if your eCommerce code is correct. Instead, it typically happens when Google Analytics receives a high number of product impressions or promotion impressions sent all at once. See the image below to understand what the error looks like: 

So what causes it? The error triggers based on the maximum number of objects. This varies from site to site, and functions based on the type of product impression (product name, id, price, brand, category, variant, and list) as well as the amount of data collected. 

It is also possible to collect other data within the same hit (custom dimensions and metrics, autoLink domains, etc.). In general, if there are more than 50 objects collected in a single hit, you’ll likely receive this error.  

According to Google’s recommendations, you don’t need to create additional tags to collect enhanced eCommerce data – just enable enhanced eCommerce features in the regular pageview tag:

Since it’s a common practice to send product impressions with a pageview, the pageview itself isn’t sent to Google Analytics if we face the HTTP Request Limit issue. If there are no other hits registered on the same page, then the user temporarily disappears from the site.

To solve the error, separate product or promo impressions so that you can navigate your site and determine how many objects send in a single hit.

You can also partner with a developer to fix the error. They can create a product impression array and push it to the dataLayer in parts. But what if you have limited development resources or a tight deadline?  

Let’s say that the site’s product listings contain 70 objects. We determine that 35 products send correctly in a single HTTP request. To solve the issue, split the product array into two, with 35 products in each.

Since Google Tag Manager is the base of implementation, all of the correct data is in the dataLayer, and you won’t need to touch the source code to solve the issue. 

Tip: Combine Product Detail and Product Impression Data

Many eCommerce sites put related products on product detail pages, where they are often labeled things such as:

“You May Also Like” 

– “Buy With These”

“Frequently Bought Together”

“Recently Viewed”

Measure these as product impressions in enhanced eCommerce implementation.  

You can also combine product detail views and product impressions and measure them in a single hit. Then, you can push the following code to the dataLayer, and both the product detail and product impression data will send to Google Analytics:

<script>

dataLayer.push ({‘eCommerce’: {

                           ‘impressions’: [

  {

    ‘name’: ‘T-Shirt’,       

    ‘id’: ‘12345’,

    ‘price’: ‘10.00’,

    ‘brand’: ‘Brand1’,

    ‘category’: ‘Apparel’,

    ‘variant’: ‘V-neck’,

    ‘list’: ‘Buy with This’,

    ‘position’: 1

  },

  {

    ‘name’: ‘Jeans’,

    ‘id’: ‘67890’,

    ‘price’: ‘30.00’,

    ‘brand’: ‘Brand2’,

    ‘category’: ‘Apparel’,

    ‘variant’: ‘Relaxed’,

    ‘list’: ‘Buy with This’,

    ‘position’: 2

  }],

   ‘detail’: {

   ‘actionField’: {‘list’: ‘Sales’},

   ‘products’: [{

     ‘name’: ‘Jacket’,      

     ‘id’: ‘11111’,

     ‘price’: ‘40.00’,

     ‘brand’: ‘Brand3’,

     ‘category’: ‘Apparel’,

     ‘variant’: ‘Black’

    }]

  }

                 }

});

</script>

In this case, both ec:addImpression and ec:addProduct (along with ec:setAction) commands execute, and all of the data send to Google Analytics:

In practice, product impressions and detail view data are rarely pushed together in the same dataLayer. You can push detail data first and impression data shortly after in a different push method. As a result, you will see the below image in the Google Tag Manager debug pane:

The enhanced eCommerce tag fires on the Window Loaded event when all the data has already pushed to the dataLayer. However, if we check the JavaScript console we’ll see something strange: only the ec:addImpression command executes and therefore, only impression data of related products send to Google Analytics:

Solution: Add everything in a single push, add an event to every push, or use the read data from variable option

Why does this happen? We pushed product detail view data as well as impression data to the dataLayer, and the syntax is correct. Google Tag Manager can access the eCommerce object only if we select the ‘Use Data Layer’ option in our Ecommerce tag set up. This results in lost product detail or impression data depending on which dataLayer push() happens first. Depending on your resources and the content on your product detail pages, you have a few options for fixing the error:

Option 1: Add everything in a single push

If you can involve your development team, you’ll need to ask them to combine a detail view and product impression data in a single dataLayer.push(). All of the data added within one push gets sent to Google Analytics as a result of executing the ec: addImpression and ec:addProduct commands.

This method works even if you need to measure two or more sets of impressions on the same page alongside product detail views (i.e., “Recently Viewed” and “Frequently Bought Together”).

Option 2: Add an event to every push

You can ask your developer to add the event key to every dataLayer.push() when adding impression or product detail data:

<script>

dataLayer.push ({‘eCommerce’: {                        

 ‘detail’: {

   ‘actionField’: {‘list’: ‘Sales’},

   ‘products’: [{

     ‘name’: ‘Jacket’,      

     ‘id’: ‘11111’,

     ‘price’: ‘40.00’,

     ‘brand’: ‘Brand1’,

     ‘category’: ‘Apparel’,

     ‘variant’: ‘Black’

    }]

  }

                },

              ‘event’: “GAecommerce”

});

</script>

Then, add ‘GA ecommerce” as a custom event that fires your enhanced eCommerce tag, which will enable the Use Data Layer option. The tag will fire several times, and each piece of eCommerce data sends separately.

Make sure that you send eCommerce data with the Event type tag, which prevents an increase in the number of pageviews.

This method also works if you need to send two (or more) different impression objects. Once you add two different sets of product impressions to the dataLayer in separate pushes, i.e., “Recently Viewed and Frequently Bought Together,” the latest object with the impressions action will overwrite (completely or partially) the previous impression object.

If you add the event key, the latest impression object will not prevent the previous one from being sent to Google Analytics.

Option 3: Use the Read Data from Variable option

If you don’t want to involve a developer, you can access impression and detail objects on a product detail page and combine them in a single JavaScript variable:

function () {

  var ecom = {‘ecommerce’ : {

 ‘impressions’: {{impressions}},

 ‘detail’: {{detail}}

  }

};

  return ecom;

}

The {{impressions}} and the {{detail}} variables are the dataLayer variables pulled from the eCommerce object:

Next, modify your enhanced eCommerce tag settings from “Use Data Layer” to “Read Data from Variable” and reference the above JavaScript variable as a source for the eCommerce data. Note that if your regular enhanced eCommerce tag uses the dataLayer to access the data, you should create another tag for product detail pages and add them as an exception to the main tag.

It’s also essential to note that this method will not work for multiple impression objects since the latest object will still overwrite the previous object (or objects). So, if you have different impression sets on a page, i.e. ‘Recently Viewed’ and ‘Frequently Bought Together,’ you will need to use one of the other methods we’ve outlined here.

Error #2: Product-scoped custom dimensions

Product-scoped custom dimensions and metrics are unique in their set up, so there are a few things you’ll need to keep in mind when working with these types of custom variables.

First, product-scoped custom dimensions only work for enhanced eCommerce, and Google Tag Manager won’t read them with standard eCommerce implementation. For example, you’ll need to use the following custom dimension to state the in-stock status of a product:

(“Yes” or “No”) will never get sent to GA:

<script>

dataLayer.push({

  ‘transactionId’: ‘123456789’

  ‘transactionTotal’: 500.00, 

  ‘transactionTax’: 10.00,                                                 

  ‘transactionProducts’: [{

     ‘sku’: ‘00001’,                                                                        

     ‘name’: ‘T-Shirt’,                                                      

     ‘category’: ‘Apparel’,                                                 

     ‘price’: 490.00,                                                                       

     ‘quantity’: 1,

        ‘dimension1’: ‘Yes’                                                                       

}]   

 });

</script>

Also, Product-scoped custom dimensions and metrics do not require additional customization in Google Tag Manager. 

Solution: Set up hit, session, or user level custom dimensions in Google Tag Manager

Follow these steps to set up hit-, session- or user-level custom dimensions in Google Tag Manager:

If using a dataLayer variable, implement it in the dataLayer first.  

Add a new custom dimension/metric in your Google Analytics profile

Create a variable in Google Tag Manager – this can be a dataLayer variable, part of a URL, custom JavaScript, or another type of variable. 

Add an index of the added custom dimension/metric from Google Analytics with the value of the variable you created to your Google Tag Manager tag – pageview, transaction, or event tag.

Note that you don’t have to pick a value for product-scoped dimensions and metrics from the dataLayer. Instead, there are two main steps for setting up a product-level custom dimension or metric:

Add a new custom dimension/metric in your Google Analytics profile, select Product as a scope;

Implement a custom dimension/metric in the dataLayer adding it into a products array object (enhanced eCommerce) with an index from the 1st step, i.e., ‘dimension1’ or ‘metric1’;

Once you enable the enhanced eCommerce features in your tag and select Use Data Layer,  the custom dimension or metric sends to Google Analytics:

<script>

dataLayer.push ({‘eCommerce’: {

                           ‘purchase’: {

                                ‘actionField’: {

                                   ‘id’: ‘123456’,                         

                                   ‘revenue’: ‘50.00’,                              

                                   ‘tax’:’5.00′,                                           

                                   ‘shipping’: ‘5.00’                                  

                          },

                          ‘products’: [{

                              ‘name’: ‘T-Shirt’,       

                              ‘id’: ‘12345’,

                             ‘price’: ‘10.00’,

                             ‘brand’: ‘Brand1’,

                             ‘category’: ‘Apparel’,

                             ‘variant’: ‘V-neck’,

                             ‘quantity’: 1,

                             ‘dimension1’: ‘Yes’

                          },{

                                  ‘name’: ‘Jeans’,

                                  ‘id’: ‘67890’,

                                  ‘price’: ‘30.00’,

                                 ‘brand’: ‘Brand2’,

                                 ‘category’: ‘Apparel’,

                                 ‘variant’: ‘Relaxed’,                                         

                                 ‘quantity’: 1,

                                 ‘dimension1’: ‘No’                              

                                }]

                     }

                 }

});

</script>

Error #3: Inconsistent product list taxonomy and product list attribution

Let’s look at an example: Say that you sell clothing online. Your product list name is Clothing/Men’ s/T-Shirts/Featured. Still, you have several slight spelling variations in your enhanced eCommerce implementation:

Clothing/Men’s/T-Shirts/Featured

Clothing/Men’s/T-shirts/Featured

Clothing/Mens/T-shirts/Featured

Let’s say that you use the first version of spelling in the impression array, the second version for product clicks, and include the third version as an optional list property in the detail action object. This means that the list name will appear as three different rows in the Product List Performance eCommerce report:

Product list views (i.e., impressions) attribute to the first variation of the list name, product list clicks (i.e., product clicks) attribute to the second one, and the third version of list spelling takes credit for cart additions, product checkouts, and purchases.

Solution: Use consistent spelling throughout the purchase funnel

If you have complex product list names, you’ll need to make sure they have consistent spelling throughout the entire purchase funnel. For example, you might specify product categories, and subcategories, in a product list name.

Tip: If you add the third variation to product detail views only (as an optional list key), the same list name takes credit for any add-to-cart actions, product checkouts, or even purchases. This happens because the list attribute persists for all the subsequent enhanced eCommerce actions within the same session. The last list name attributes all the eCommerce actions taken by a user afterward. It’s quite similar to the Last Non-Direct Click attribution model, isn’t it?

Error #4: Products not displaying on a page

If some products are visible on a page only after clicking a button, or tab, they shouldn’t push to the dataLayer as product impressions on a page load, because a user can’t view or interact with products on a site until the products display. 

Solution: Make sure product impressions push with an event post-click

For example, if a user clicks the “Frequently Bought Together” button and views new products, make sure the product impressions push with an event after the button gets clicked:

<script>

dataLayer.push ({‘eCommerce’: {

                           ‘impressions’: [

  {

    ‘name’: ‘T-Shirt’,       

    ‘id’: ‘12345’,

    ‘price’: ‘10.00’,

    ‘brand’: ‘Brand1’,

    ‘category’: ‘Apparel’,

    ‘variant’: ‘V-neck’,

    ‘list’: ‘Frequently Bought Together’,

    ‘position’: 1

  }],

                 },

      ‘event’: ‘GAecommerce’

});

</script>

When the impression data becomes available, grab it with an event tracking tag where the enhanced eCommerce features are enabled. Fire this tag with a custom event trigger (the GAecommerce custom event).

To learn more about the features of Google Analytics, read our blog posts on custom attribution modeling in Google Analytics. Or discover how to count Google Analytics sessions using Big Query.


Ready to take your ads to the next level?  
DELVE is your strategic partner for site-side analytics, campaign management, and advanced marketing science. As experts in the Google Marketing Platform and Google Cloud Platform, DELVE drives client growth through a data-driven mindset that converts digital inefficiency into hard ROI.  
SEE EXAMPLES of our experience and reviews from our clients.
Contact us to learn more about how we help our clients get advertising right.
DELVE Experts
delve.experts@delvepartners.com


Enhanced Ecommerce: Keys To Accurate Data

For eCommerce brands, tracking website actions is a critical part of successful marketing and sales….

Enhanced Ecommerce: Keys To Accurate Data

For eCommerce brands, tracking website actions is a critical part of successful marketing and sales. Google Analytics offers an enhanced eCommerce plugin that provides a holistic view of all the actions on your site, including how users browse your products online, and the steps they take that ultimately lead to conversion.  

Enhanced Ecommerce vs. Standard Ecommerce Plugin

Google Analytics offers two ways to track your sales data: standard eCommerce tracking, and enhanced eCommerce tracking. 

Standard tracking allows you to track sales through one or two final pages a user sees after completing a purchase- such as an order confirmation page or thank you page. On the other hand, enhanced eCommerce tracking allows you to evaluate the customer journey to purchase at multiple touchpoints, such as adding items to a cart, or entering billing and credit card information. The enhanced eCommerce plugin also allows you to understand reports on each product you sell, and helps you discover where users decide not to follow through with their purchase.  

In addition, clean data and accurate tracking provide the best actionable insights for your brand, especially when you need to understand if the overall customer experience on your site drives users to purchase. More importantly, bugs and errors from incorrect implementation can cause issues that skew your measurement and may drive you to make incorrect conclusions about the customer journey. 

Therefore, it’s essential to check your Google Analytics profile, and verify that data correctly pushes through to the dataLayer when you implement the plugin. After that,, make sure that the data meets your general expectations. If there are any significant surprises, you’ll likely see an error and need to dig deeper to figure out the cause.

So what should you do if you think there’s an error and you might be dealing with erroneous data? Let’s walk through some of the most common errors and how to fix your eCommerce plugin implementation when something goes wrong. Note that we focus on implementation based on Google Tag Manager, since it actively uses dataLayer.  

Error #1: HTTP Request Limit exceeded (aka Payload size is too large)

This error can appear even if your eCommerce code is correct. Instead, it typically happens when Google Analytics receives a high number of product impressions or promotion impressions sent all at once. See the image below to understand what the error looks like: 

So what causes it? The error triggers based on the maximum number of objects. This varies from site to site, and functions based on the type of product impression (product name, id, price, brand, category, variant, and list) as well as the amount of data collected. 

It is also possible to collect other data within the same hit (custom dimensions and metrics, autoLink domains, etc.). In general, if there are more than 50 objects collected in a single hit, you’ll likely receive this error.  

According to Google’s recommendations, you don’t need to create additional tags to collect enhanced eCommerce data – just enable enhanced eCommerce features in the regular pageview tag:

Since it’s a common practice to send product impressions with a pageview, the pageview itself isn’t sent to Google Analytics if we face the HTTP Request Limit issue. If there are no other hits registered on the same page, then the user temporarily disappears from the site.

To solve the error, separate product or promo impressions so that you can navigate your site and determine how many objects send in a single hit.

You can also partner with a developer to fix the error. They can create a product impression array and push it to the dataLayer in parts. But what if you have limited development resources or a tight deadline?  

Let’s say that the site’s product listings contain 70 objects. We determine that 35 products send correctly in a single HTTP request. To solve the issue, split the product array into two, with 35 products in each.

Since Google Tag Manager is the base of implementation, all of the correct data is in the dataLayer, and you won’t need to touch the source code to solve the issue. 

Tip: Combine Product Detail and Product Impression Data

Many eCommerce sites put related products on product detail pages, where they are often labeled things such as:

“You May Also Like” 

– “Buy With These”

“Frequently Bought Together”

“Recently Viewed”

Measure these as product impressions in enhanced eCommerce implementation.  

You can also combine product detail views and product impressions and measure them in a single hit. Then, you can push the following code to the dataLayer, and both the product detail and product impression data will send to Google Analytics:

<script>

dataLayer.push ({‘eCommerce’: {

                           ‘impressions’: [

  {

    ‘name’: ‘T-Shirt’,       

    ‘id’: ‘12345’,

    ‘price’: ‘10.00’,

    ‘brand’: ‘Brand1’,

    ‘category’: ‘Apparel’,

    ‘variant’: ‘V-neck’,

    ‘list’: ‘Buy with This’,

    ‘position’: 1

  },

  {

    ‘name’: ‘Jeans’,

    ‘id’: ‘67890’,

    ‘price’: ‘30.00’,

    ‘brand’: ‘Brand2’,

    ‘category’: ‘Apparel’,

    ‘variant’: ‘Relaxed’,

    ‘list’: ‘Buy with This’,

    ‘position’: 2

  }],

   ‘detail’: {

   ‘actionField’: {‘list’: ‘Sales’},

   ‘products’: [{

     ‘name’: ‘Jacket’,      

     ‘id’: ‘11111’,

     ‘price’: ‘40.00’,

     ‘brand’: ‘Brand3’,

     ‘category’: ‘Apparel’,

     ‘variant’: ‘Black’

    }]

  }

                 }

});

</script>

In this case, both ec:addImpression and ec:addProduct (along with ec:setAction) commands execute, and all of the data send to Google Analytics:

In practice, product impressions and detail view data are rarely pushed together in the same dataLayer. You can push detail data first and impression data shortly after in a different push method. As a result, you will see the below image in the Google Tag Manager debug pane:

The enhanced eCommerce tag fires on the Window Loaded event when all the data has already pushed to the dataLayer. However, if we check the JavaScript console we’ll see something strange: only the ec:addImpression command executes and therefore, only impression data of related products send to Google Analytics:

Solution: Add everything in a single push, add an event to every push, or use the read data from variable option

Why does this happen? We pushed product detail view data as well as impression data to the dataLayer, and the syntax is correct. Google Tag Manager can access the eCommerce object only if we select the ‘Use Data Layer’ option in our Ecommerce tag set up. This results in lost product detail or impression data depending on which dataLayer push() happens first. Depending on your resources and the content on your product detail pages, you have a few options for fixing the error:

Option 1: Add everything in a single push

If you can involve your development team, you’ll need to ask them to combine a detail view and product impression data in a single dataLayer.push(). All of the data added within one push gets sent to Google Analytics as a result of executing the ec: addImpression and ec:addProduct commands.

This method works even if you need to measure two or more sets of impressions on the same page alongside product detail views (i.e., “Recently Viewed” and “Frequently Bought Together”).

Option 2: Add an event to every push

You can ask your developer to add the event key to every dataLayer.push() when adding impression or product detail data:

<script>

dataLayer.push ({‘eCommerce’: {                        

 ‘detail’: {

   ‘actionField’: {‘list’: ‘Sales’},

   ‘products’: [{

     ‘name’: ‘Jacket’,      

     ‘id’: ‘11111’,

     ‘price’: ‘40.00’,

     ‘brand’: ‘Brand1’,

     ‘category’: ‘Apparel’,

     ‘variant’: ‘Black’

    }]

  }

                },

              ‘event’: “GAecommerce”

});

</script>

Then, add ‘GA ecommerce” as a custom event that fires your enhanced eCommerce tag, which will enable the Use Data Layer option. The tag will fire several times, and each piece of eCommerce data sends separately.

Make sure that you send eCommerce data with the Event type tag, which prevents an increase in the number of pageviews.

This method also works if you need to send two (or more) different impression objects. Once you add two different sets of product impressions to the dataLayer in separate pushes, i.e., “Recently Viewed and Frequently Bought Together,” the latest object with the impressions action will overwrite (completely or partially) the previous impression object.

If you add the event key, the latest impression object will not prevent the previous one from being sent to Google Analytics.

Option 3: Use the Read Data from Variable option

If you don’t want to involve a developer, you can access impression and detail objects on a product detail page and combine them in a single JavaScript variable:

function () {

  var ecom = {‘ecommerce’ : {

 ‘impressions’: {{impressions}},

 ‘detail’: {{detail}}

  }

};

  return ecom;

}

The {{impressions}} and the {{detail}} variables are the dataLayer variables pulled from the eCommerce object:

Next, modify your enhanced eCommerce tag settings from “Use Data Layer” to “Read Data from Variable” and reference the above JavaScript variable as a source for the eCommerce data. Note that if your regular enhanced eCommerce tag uses the dataLayer to access the data, you should create another tag for product detail pages and add them as an exception to the main tag.

It’s also essential to note that this method will not work for multiple impression objects since the latest object will still overwrite the previous object (or objects). So, if you have different impression sets on a page, i.e. ‘Recently Viewed’ and ‘Frequently Bought Together,’ you will need to use one of the other methods we’ve outlined here.

Error #2: Product-scoped custom dimensions

Product-scoped custom dimensions and metrics are unique in their set up, so there are a few things you’ll need to keep in mind when working with these types of custom variables.

First, product-scoped custom dimensions only work for enhanced eCommerce, and Google Tag Manager won’t read them with standard eCommerce implementation. For example, you’ll need to use the following custom dimension to state the in-stock status of a product:

(“Yes” or “No”) will never get sent to GA:

<script>

dataLayer.push({

  ‘transactionId’: ‘123456789’

  ‘transactionTotal’: 500.00, 

  ‘transactionTax’: 10.00,                                                 

  ‘transactionProducts’: [{

     ‘sku’: ‘00001’,                                                                        

     ‘name’: ‘T-Shirt’,                                                      

     ‘category’: ‘Apparel’,                                                 

     ‘price’: 490.00,                                                                       

     ‘quantity’: 1,

        ‘dimension1’: ‘Yes’                                                                       

}]   

 });

</script>

Also, Product-scoped custom dimensions and metrics do not require additional customization in Google Tag Manager. 

Solution: Set up hit, session, or user level custom dimensions in Google Tag Manager

Follow these steps to set up hit-, session- or user-level custom dimensions in Google Tag Manager:

If using a dataLayer variable, implement it in the dataLayer first.  

Add a new custom dimension/metric in your Google Analytics profile

Create a variable in Google Tag Manager – this can be a dataLayer variable, part of a URL, custom JavaScript, or another type of variable. 

Add an index of the added custom dimension/metric from Google Analytics with the value of the variable you created to your Google Tag Manager tag – pageview, transaction, or event tag.

Note that you don’t have to pick a value for product-scoped dimensions and metrics from the dataLayer. Instead, there are two main steps for setting up a product-level custom dimension or metric:

Add a new custom dimension/metric in your Google Analytics profile, select Product as a scope;

Implement a custom dimension/metric in the dataLayer adding it into a products array object (enhanced eCommerce) with an index from the 1st step, i.e., ‘dimension1’ or ‘metric1’;

Once you enable the enhanced eCommerce features in your tag and select Use Data Layer,  the custom dimension or metric sends to Google Analytics:

<script>

dataLayer.push ({‘eCommerce’: {

                           ‘purchase’: {

                                ‘actionField’: {

                                   ‘id’: ‘123456’,                         

                                   ‘revenue’: ‘50.00’,                              

                                   ‘tax’:’5.00′,                                           

                                   ‘shipping’: ‘5.00’                                  

                          },

                          ‘products’: [{

                              ‘name’: ‘T-Shirt’,       

                              ‘id’: ‘12345’,

                             ‘price’: ‘10.00’,

                             ‘brand’: ‘Brand1’,

                             ‘category’: ‘Apparel’,

                             ‘variant’: ‘V-neck’,

                             ‘quantity’: 1,

                             ‘dimension1’: ‘Yes’

                          },{

                                  ‘name’: ‘Jeans’,

                                  ‘id’: ‘67890’,

                                  ‘price’: ‘30.00’,

                                 ‘brand’: ‘Brand2’,

                                 ‘category’: ‘Apparel’,

                                 ‘variant’: ‘Relaxed’,                                         

                                 ‘quantity’: 1,

                                 ‘dimension1’: ‘No’                              

                                }]

                     }

                 }

});

</script>

Error #3: Inconsistent product list taxonomy and product list attribution

Let’s look at an example: Say that you sell clothing online. Your product list name is Clothing/Men’ s/T-Shirts/Featured. Still, you have several slight spelling variations in your enhanced eCommerce implementation:

Clothing/Men’s/T-Shirts/Featured

Clothing/Men’s/T-shirts/Featured

Clothing/Mens/T-shirts/Featured

Let’s say that you use the first version of spelling in the impression array, the second version for product clicks, and include the third version as an optional list property in the detail action object. This means that the list name will appear as three different rows in the Product List Performance eCommerce report:

Product list views (i.e., impressions) attribute to the first variation of the list name, product list clicks (i.e., product clicks) attribute to the second one, and the third version of list spelling takes credit for cart additions, product checkouts, and purchases.

Solution: Use consistent spelling throughout the purchase funnel

If you have complex product list names, you’ll need to make sure they have consistent spelling throughout the entire purchase funnel. For example, you might specify product categories, and subcategories, in a product list name.

Tip: If you add the third variation to product detail views only (as an optional list key), the same list name takes credit for any add-to-cart actions, product checkouts, or even purchases. This happens because the list attribute persists for all the subsequent enhanced eCommerce actions within the same session. The last list name attributes all the eCommerce actions taken by a user afterward. It’s quite similar to the Last Non-Direct Click attribution model, isn’t it?

Error #4: Products not displaying on a page

If some products are visible on a page only after clicking a button, or tab, they shouldn’t push to the dataLayer as product impressions on a page load, because a user can’t view or interact with products on a site until the products display. 

Solution: Make sure product impressions push with an event post-click

For example, if a user clicks the “Frequently Bought Together” button and views new products, make sure the product impressions push with an event after the button gets clicked:

<script>

dataLayer.push ({‘eCommerce’: {

                           ‘impressions’: [

  {

    ‘name’: ‘T-Shirt’,       

    ‘id’: ‘12345’,

    ‘price’: ‘10.00’,

    ‘brand’: ‘Brand1’,

    ‘category’: ‘Apparel’,

    ‘variant’: ‘V-neck’,

    ‘list’: ‘Frequently Bought Together’,

    ‘position’: 1

  }],

                 },

      ‘event’: ‘GAecommerce’

});

</script>

When the impression data becomes available, grab it with an event tracking tag where the enhanced eCommerce features are enabled. Fire this tag with a custom event trigger (the GAecommerce custom event).

To learn more about the features of Google Analytics, read our blog posts on custom attribution modeling in Google Analytics. Or discover how to count Google Analytics sessions using Big Query.


Ready to take your ads to the next level?  
DELVE is your strategic partner for site-side analytics, campaign management, and advanced marketing science. As experts in the Google Marketing Platform and Google Cloud Platform, DELVE drives client growth through a data-driven mindset that converts digital inefficiency into hard ROI.  
SEE EXAMPLES of our experience and reviews from our clients.
Contact us to learn more about how we help our clients get advertising right.

Related Posts

Best Practices for Amazon DSP Ads: Webinar

As consumer behavior continues to evolve due to the changing environment surrounding COVID-19, top brands…

Google Ads Budget Pacing in Paid Search Engine Marketing

The average internet user conducts between 3-4 Google searches per day. Given that there are…

What is Amazon DSP and How to Reach Amazon Target Audiences

Data is a core component of any successful marketing strategy. Making first-party data assets the…

Gaming Industry Operatore Stride Gaming Increased New Customer Revenue by 50% at a 12% Lower CPA

Understanding user behavior is essential for any company, but it’s even more significant for the…

Amazon DSP for Retailers is Now on Demand!

X