Google Analytics. Enhanced Ecommerce. Limit for product impressions - google-analytics

Does anyone know something about limits for sending impressions data for enhanced ecommerce (Google Analytics)? I found strange behavior, that sending data more than about 8KB is restricted by google. I use data layer for sending ecommerce data. I have up to 100 products on page, also I use unicode to send product and category names. So, I have much data to send. And the worst, that GA don't track pageview. It just do not send collect request at all, if I try to push to much data. In documentation I didn't anything about it. Any ideas how to avoid such limit?

As for the first part of the question, the limit for a http request to the Google Analytics endpoint is 8192 bytes - this is stated in the documentation for the measurement protocol (which is the basis for Universal Analytics).
My only idea to avoid such a limit would be to send only a product id and custom attributes to make the http request smaller and try to use dimension widening to add product names etc. in the Analytics interface. However I have not tested this and am not quite sure if dimension widening can be applied to product data (UPDATE to add: At least with Enhanced Ecommerce enabled one can indeed upload product data and custom attributes for given SKUs/product names).

I am encountering this same problem. My solution thus far has been to page results.
As stated above, limiting the attributes being sent could help reduce the size.
Google's sample:
ga('ec:addImpression', { // Provide product details in an impressionFieldObject.
'id': 'P12345', // Product ID (string).
'name': 'Android Warhol T-Shirt', // Product name (string).
'category': 'Apparel/T-Shirts', // Product category (string).
'brand': 'Google', // Product brand (string).
'variant': 'Black', // Product variant (string).
'list': 'Search Results', // Product list (string).
'position': 1, // Product position (number).
'dimension1': 'Member' // Custom dimension (string).
});
This could potentially be reduced to:
ga('ec:addImpression', { // Provide product details in an impressionFieldObject.
'id': 'P12345', // Product ID (string).
'name': 'Android Warhol T-Shirt', // Product name (string).
'category': 'Apparel/T-Shirts', // Product category (string).
});
Thoughts, ideas?

I have the same problem.
if you only can send 10 products for impressions, add this code every 10 products:
ga('send','event','Ecommerce','Impressions','NamePage',{nonInteraction: true});
Example:
ga('ec:addImpression', { // Provide product details in an impressionFieldObject.
'id': 'P12345', // Product ID (string).
'name': 'Android Warhol T-Shirt', // Product name (string).
'category': 'Apparel/T-Shirts', // Product category (string).
'brand': 'Google', // Product brand (string).
'variant': 'Black', // Product variant (string).
'list': 'Search Results', // Product list (string).
'position': 1, // Product position (number).
'dimension1': 'Member' // Custom dimension (string).
});
....
....
ga('send','event','Ecommerce','Impressions','NamePage',{nonInteraction: true});
a('ec:addImpression', { // Provide product details in an impressionFieldObject.
'id': 'P12345', // Product ID (string).
'name': 'Android Warhol T-Shirt', // Product name (string).
'category': 'Apparel/T-Shirts', // Product category (string).
'brand': 'Google', // Product brand (string).
'variant': 'Black', // Product variant (string).
'list': 'Search Results', // Product list (string).
'position': 1, // Product position (number).
'dimension1': 'Member' // Custom dimension (string).
});
...
...

Related

custom dimension with product and transaction hit

I have some problems with using custom dimensions with enhanced ecoomerce.
code below.
I would like to add 3 custom dimensions as product scopes and it works. but still I would like to add one custom dimension to transaction as hit scope. My below code doesn't works for dimension1. where should I place 'dimension1': 'zamowienie' to have info about the whole transaction, not olny products?
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': '194771', // Transaction ID. Required for purchases and refunds.
'dimension1': 'zamowienie',
'revenue': '35.27', // Total transaction value (incl. tax and shipping
'shipping': '5.99'
},
'products': [{
'dimension2': 'JP Delaney',
'dimension3': 'jak nowa',
'dimension4': 'ksiazka',
'name': 'Lokatorka', // Name or ID is required.
'id': '9788375150780',
'price': '27.99',
'quantity': 1 // Optional fields may be omitted or set to empty string.
},
{
'dimension2': 'Kelly Creagh',
'dimension3': 'widoczne ślady używania',
'dimension4': 'ksiazka',
'name': 'Nevermore T.1 Kruk',
'id': '9788376860657',
'price': '7.28',
'quantity': 1
}]
}
}
});
as long as you're using product scopes custom dimensions you need to put then alongside other product fields in the product object. In your example that would look like
{
'dimension1': 'some value',
'dimension2': 'JP Delaney',
'dimension3': 'jak nowa',
'dimension4': 'ksiazka',
'name': 'Lokatorka', // Name or ID is required.
'id': '9788375150780',
'price': '27.99',
'quantity': 1
},
however, this would make sense only to report persistent product properties otherwise your products wouldn't be aggregated properly in the reports. For example, having a product dimension value of 'zamowienie' in the transactions products but not in checkout products may result in missing that checkout steps in the funnel report with dimensions1 since those would be treated as different products.

GA Enhance Ecommerce Product List Performance

I'm using Enhanced Ecommerce and I want to know how good my product lists perform. Below a screenshot of the product list performance section.
You can see that I've set up three lists:
productgroep default (Standard product listing)
productgroep filtered (Product listing with filters used)
detail view (this is actually a product detail page, so no listing.)
There is also a:
(not set) product list name, this one comes by default.
Now when I click on a product in a list, it counts in the column Product List Clicks, all fine.
One can also add a product directly to the cart when the list is shown, so these are also measured and shown in the column Product Adds To Card.
Now when the product is purchased, it counts the Product Checkouts, Unique Purchases and Product Revenue in the product List (not set).
When the product is added to the cart directly from a list, I also do:
ga("ec:setAction", "click", {
"list": "productgroep default"
});
Why doesn't GA add these purchases to the correct product list?
When product is clicked from list page, do:
ga('ec:addProduct', {
'id': id,
'name': name,
'category': 'Apparel',
'brand': 'Nike',
'variant': 'black',
'position': 1
});
ga('ec:setAction', 'click', {list: listName});
ga('send', 'event', 'UX', 'click', 'Results');
When the product is added to the cart directly from a list, do:
ga('ec:addProduct', {
'id': id,
'name': name,
'category': 'Apparel',
'brand': 'Nike',
'variant': 'black',
'position': 1
});
ga('ec:setAction', 'click', {list: listName});
ga('send', 'event', 'UX', 'click', 'Add to Cart Catalog');
On product details page load, do :
ga('ec:addProduct', {
'id': id,
'name': name,
'category': 'Apparel',
'brand': 'Nike',
'variant': 'black'
});
ga('ec:setAction', 'detail');
ga('send', 'pageview');
The attribution in the enhanced eCommerce is a little trick, it makes list attribution and promotion attribution.
Relate to the list attribution, the purchase is recursively attributed to the last list viewed that contains the id of the product. So, even if you access the cart through one page, f you open another page that contains the product id before making the purchase, the attribution will change. With the promotion attribution is kind of different, the purchase is attributed to the last promotion clicked.
Make sure of the structure of the enhanced eCommerce object as well.
There's a full explanation here. This blog has a lot of information about it.

Do I always need to send full product data to Google Analytics Enhanced Ecommerce?

When I send the full product data to Google Analytics in the first event E1, do I still need to send compete product data in subsequent events E2, E3,... related to that product?
So, to be more concrete, let's say I send following product data to Google Analytics when the user sees the product on the page (product impression):
ga('ec:addImpression', {
'id': 'P12345', // Product ID (string).
'name': 'Android Warhol T-Shirt', // Product name (string).
'category': 'Apparel/T-Shirts', // Product category (string).
'brand': 'Google', // Product brand (string).
'variant': 'Black', // Product variant (string).
'list': 'Search Results', // Product list (string).
'position': 1, // Product position (number).
});
Now what will happen if I only send product id in subsequent events related to that product:
ga('ec:addProduct', {
'id': 'P12345'
});
Will Google Analytics find the product data created by the impression by product ID and "join" the product data? Or those two events will be connected to two separate products and the second event will be missing all the product data (e.g. I won't be able to filter that event by product category)?
Is that behaviour documented anywhere in Google Analytics documentation?

Revenue always zero for addtransaction

I am implementing addItem and addTransaction on a web shop's cart page. Once an order has been placed, I go through the carts content and add each individual item as an addItem with google analytics ecommerce plugin, then I create the transaction and send it altogether to google.
What happens in google analytics is that all transactions show up as having 0 revenue, 0 tax and 0 shipping - but if I enter one individual transaction I can see the item price, name and quantity ordered.
This is the final executing google analytics code once rendered:
ga('require', 'ecommerce');
ga('ecommerce:addItem', { 'id': '143506092300', 'name': 'PRODUCT NAME #1 , COLOR Black', 'price': '229.00', 'quantity': '1'});
ga('ecommerce:addTransaction', { 'id': 'xxx123', 'affiliation': 'Web Shop Name', 'revenue': '229.00', 'shipping': '0.00', 'tax': '45.80'});
ga('ecommerce:send');
Does anyone see what I'm missing here?
So I had two issues:
the ID in the addItem block was actually the product ID, but it is supposed to be the transaction ID.
The solution was to have the same ID in all addItem calls and this ID in the transaction call.
Additionally, the transaction code should appear before the addItem calls, the following works for me:
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', { 'id': '143506092300', 'affiliation': 'Web Shop Name', 'revenue': '229.00', 'shipping': '0.00', 'tax': '45.80'});
ga('ecommerce:addItem', { 'id': '143506092300', 'name': 'PRODUCT NAME #1 , COLOR Black', 'price': '229.00', 'quantity': '1'});
ga('ecommerce:send');

Enhanced Ecommerce Get Checkout Abandonment

I've implemented Google Analytics Enhanced Ecommerce on my site. However I cannot track checkout abandonment.
I've implemented it this way.
Every time a customer checkout an order (eg. masterpass or visa), I fire this code before redirecting to their page (if the user clicks masterpass or visa payment)
ga('ec:addProduct', { // Provide product details in an productFieldObject.
'id': 'P12345', // Product ID (string).
'name': 'Android Warhol T-Shirt', // Product name (string).
'category': 'Apparel', // Product category (string).
'brand': 'Google', // Product brand (string).
'variant': 'black', // Product variant (string).
'price': '29.20', // Product price (currency).
'quantity': 1 // Product quantity (number).
});
ga('ec:setAction','checkout', {
'step': 1,
'option': 'Visa' });
I can track sessions with checkout however my checkout abandonment is stuck at 0, even if I don't attempt to checkout.
Do you guys have any knowledge about this?
Hi,
The code as it is would be incomplete, you need to fire a hit in order to send all that information either with a pageview or an event.
When in a session there is no cart activity the checkout abandonment is 0% (since no one started a checkout process)

Resources