magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.47k stars 9.28k forks source link

Google Analytics CSP Error https://region1.analytics.google.com #37750

Open timpea-splat opened 1 year ago

timpea-splat commented 1 year ago

Preconditions and environment

Steps to reproduce

Enable Google Analytics View Website from the EU - Inspect and view CSP console errors.

Expected result

No CSP errors

Actual result

[Report Only] Refused to connect to 'https://region1.analytics.google.com/g/collect?v=28** REMOVED ****' because it violates the following Content Security Policy directive: "connect-src www.google-analytics.com www.googleadservices.com analytics.google.com www.googletagmanager.com vimeo.com www.sandbox.paypal.com www.paypalobjects.com www.paypal.com pilot-payflowlink.paypal.com .ideal-postcodes.co.uk .doubleclick.net *.google-analytics.com 'self' 'unsafe-inline'".

Additional information

See update from Google: https://support.google.com/analytics/answer/12017362?sjid=7210281846540305633-EU

EU data is collected in the EU Google Analytics 4 collects all data from EU-based devices (based on IP-geo lookup) through domains and on servers based in the EU before forwarding traffic to Analytics servers for processing.

If you currently use a Content Security Policy (CSP), update your configurations (img-src and connection-src directives) to allow the following domains used by Analytics:

.google-analytics.com .analytics.google.com

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @timpea-splat. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:


m2-assistant[bot] commented 11 months ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Dash commented 10 months ago

Hi @timpea-splat . Thanks for reporting and collaboration. Tested google analytics CSP errors for EU region and able to reproduce the issue. Please refer the screenshot below.

Screenshot 2023-10-27 at 3 02 09 PM
github-jira-sync-bot commented 10 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9922 is successfully created for this GitHub issue.

m2-assistant[bot] commented 10 months ago

:white_check_mark: Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

apedicdev commented 1 month ago

Hi, I'm experiencing this issue on 2.4.7-p1 too. is there any update?

apedicdev commented 1 month ago

@magento I am working on this

apedicdev commented 1 month ago

PR open https://github.com/magento/magento2/pull/38991