kalnyc67 / analytics-issues

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

analytics.js doesn't work in sandboxed iframe. #494

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Name of affected component: analytics.js

Issue summary:
analytics.js try to access document.cookie even if
the cookie was disabled.
e.g. by this code:

ga('create', 'UA-XXXX-Y', {
  'storage': 'none',
  'clientId': '35009a79-1a05-49d7-b876-2b884d0f825b'
});

This cause analytics.js to not functional in sandboxed iframe.

Steps to reproduce issue:
1.Create top window document with sandboxed iframe contain second document.
2.Embed Google Analytics (maybe with 
https://www.google-analytics.com/analytics_debug.js ) in the second document 
with cookie disabled.(manually set the client id)

Expected output:
Google Analytics can operate normally without attempt to access the cookie.

Actual results:
It yield some error (when using analytics_debug.js) about the cookie and 
doesn't work.

Notes:
Some additional info: 
https://code.google.com/p/chromium/issues/detail?id=377494 (see comment #3 and 
#6)

Original issue reported on code.google.com by sarun...@gmail.com on 16 Sep 2014 at 4:34