Using Cloudflare does not affect Google Analytics (GA) tracking if it is added to the websitein one of ways recommended by Google ↗.
Cloudflare proxies traffic to your origin web server, but the GA JavaScript code never actually sends traffic to your server. Instead, it executes directly in a user's browser and does not interact with Cloudflare.
Cloudflare only affects analytics tools that read logs directly from your web server (like awstats).
To troubleshoot potential issues with Google Analytics, refer toCommon GA setup mistakes ↗.
As an alternative to the standard setup of Google Analytics with tag/snippet, Cloudflare offers a way to use Google Analytics withZaraz. Zaraz is a solution that allows Google Analytics to collect data without its script loaded on the website. If GA is set up this way, then not all features may be available.
Details about features of Google Analytics that are unavailable with Zaraz can be found inZaraz FAQ
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark