Google Analytics. Enhanced Ecommerce. Limit for pr

2019-02-15 05:48发布

问题:

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?

回答1:

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).



回答2:

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?