When I compare transactions in my production database with transactions in the Google Analytics Ecommerce dashboard, it is evident that I am missing a significant amount of data. I made a purchase for testing purposes in my website and in the "Thank you page" that appears after a successful purchase, I saw the following Google Analytics tracking code when I inspected the element:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '[My Google Analytics tracking ID]', 'auto');
ga('require', 'ec');
ga('ec:addProduct', {
'id': '[Product ID]', 'name': '[Product name]', 'category': '[Product category]',
'brand': '[Product brand]', 'variant': '[Product variant]', 'price': '[Product price]', 'quantity': 1 });
// Transaction level information is provided via an actionFieldObject.
ga('ec:setAction', 'purchase', { 'id': '[Transaction ID]', 'affiliation': '[Organization where the transaction took place]', 'revenue': '[Revenue value]' });
ga('send', 'pageview');
</script>
This transaction took place about 24 hours ago. When I go to the Google Analytics Ecommerce dashboard, to the "Sales Performance" section, when I look for a transaction with the ID that I sent in 'id': '[Transaction ID]'
above, I cannot find that transaction:
In the oval above I am providing the [Transaction ID] but it is not found as you can see. I have found many cases in my database where there are transactions that I cannot find in Google Analytics Ecommerce.
Google Analytics is showing some transactions but not all of them. I examined the code sent to Google Analytics and it is correct, no syntax errors, everything is perfect. Why is the Google Analytics Ecommerce "Sales Performance" section missing transactions? Thank you.
UPDATE 1:
For 'name': '[Product name]'
, I am sending as the [Product name]
a string of 145 B. To give you an idea, it would be approximately this long:
¡Lore T99 mi psumi ss E325 impl Dummyte Xtífthe + Printingand Typesetting (Iñd Ustrylore, Ips um Hasbee, Nthein) Dustr Ss Ttandar! (2018-01-05)
The text contains the following special characters:
- ¡
- í
- +
- (
- ñ
- ,
- )
- !
- -
Is the length the problem (145 B), or the fact that I am sending special characters in the [Product name]
?