UpendraSingh / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Enhanced ecommerce internal promotions views being reported twice #896

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
---------------------------------------------------------------------------
NOTE: This tool is not designed to request help. It is only for reporting
issues and requesting features for the Google Analytics libraries.

If you are a developer and you need help, visit:
https://developers.google.com/analytics/help/

If you are not a developer and you need help, visit:
https://support.google.com/analytics
---------------------------------------------------------------------------
Name of affected component: Web Tracking (analytics.js)

Issue summary:

chirag j
chirag j

1h

I have below GA code in my test page:

<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_debug.js','ga');

  ga('create', 'UA-64410705-12', 'auto');

  ga('require', 'ec');
  ga('send', 'pageview');

ga('ec:addPromo', {
'name': 'Blog Post #300'
});

ga('ec:addPromo', {
'name': 'Blog Post #301'
});
ga('send', 'event', 'Internal Promotions', 'impressions',{
'nonInteraction': 1
});

</script>

Now for every page load, this fires one call or beacon or ajax request to GA (I 
checked with firebug net tab). But in the GA reports, I always see 2 
impressions both for Blog Post #300 and Blog Post #301. I have even checked 
this after 48 hours and still the impressions are double of what they actually 
should be.

Steps to reproduce issue:
1. Create a new tracking id with enhanced ecommerce enabled and substitute it 
in the code sample above.
2. Inject the above GA code in any test web page.
3. Load the test web page only once and check with fire bug or google tag 
manager that there is only once call being sent to GA containing name data for 
both the internal promotions.
4. Go to the GA reporting Conversion->Ecommerce->Marketing->Internal Promotions 
(keep refreshing for few minutes) and see that the internal promotion views are 
being displayed as 2 for both Blog Post #300 and Blog Post #301.
5. Check the same stats after 48 hours and they are still same. 

Expected output:
The internal promotion impressions for both Blog Post #300 and Blog Post #301 
should be reported only as 1.

Actual results:
The internal promotion impressions for both Blog Post #300 and Blog Post #301 
are being reported as 2.

Original issue reported on code.google.com by chiragja...@gmail.com on 29 Feb 2016 at 10:32