Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content-security-policy vs. Google Analytics and AdSense #90

Closed
Nick-Levinson opened this issue Jan 3, 2016 · 2 comments
Closed

content-security-policy vs. Google Analytics and AdSense #90

Nick-Levinson opened this issue Jan 3, 2016 · 2 comments

Comments

@Nick-Levinson
Copy link

Content Security Policy is incompatible with Google Analytics and Google AdSense. Even the default-src wildcard, which is intended to admit everything from everywhere, is insufficient permission. If either Google product is wanted on a website, CSP must be left disabled (e.g., commented out) from .htaccess site-wide applicability. I reported this to Google (https://www.en.advertisercommunity.com/t5/Code-Implementation/content-security-policy-and-Analytics-and-likely-AdSense/m-p/491031 (not substantively updated in 3 weeks, thus Google not claiming compatibility)). Even though Google's humans saw Analytics code in my site, Google's machinery did not see it until I recommented-out all of CSP from my site.

I did not test with a non-httpd server (I don't have one), a meta tag (too many website pages), or any competitor's analytics or advertising product (I don't have them installed).

I posted this issue in GitHub under html5-bolerplate and a respondent offered what was meant as a contrary example, but it was only an example of how to write CSP for a website, not an example of a working website with Google Analytics data reports or AdSense ads that contradicted the problem that Google, either accidentally or not, apparently doesn't allow any CSP, even a default-src wildcard. Since this is an .htaccess issue, it probably belongs here rather than there, anyway.

This conflict between CSP and Google Analytics and AdSense should be stated in .htaccess > Security > Content Security Policy (CSP) (regarding both Google products) and in extend.md > Google Universal Analytics (regarding Analytics only) and in a new section I propose, extend.md > Google AdSense.

@alrra
Copy link
Member

alrra commented Jan 5, 2016

A response to this was already given in h5bp/html5-boilerplate#1765.

@alrra alrra closed this as completed Jan 5, 2016
@Nick-Levinson
Copy link
Author

Nick-Levinson commented Jan 6, 2016 via email

@h5bp h5bp locked and limited conversation to collaborators Jan 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants