Optimize analytics
2 min read
Web analytics let you measure user behavior - pageviews, sessions, and custom events - on your application.
Cloudflare offers two ways to improve the privacy and performance of the way you gather these analytics.
Cloudflare Web Analytics
If you want analytics without using third-party tools, check out Cloudflare Web Analytics.
Cloudflare Web Analytics provides free, privacy-first analytics for your website without changing your DNS or using Cloudflare’s proxy. Cloudflare Web Analytics helps you understand the performance of your web pages as experienced by your site visitors.
All you need to enable Cloudflare Web Analytics is a Cloudflare account and a JavaScript snippet on your page to start getting information on page views and visitors. The JavaScript snippet (also known as a beacon) collects metrics using the Performance API, which is available in all major web browsers.
Setup
So long as your traffic is proxied through Cloudflare, setting up Web Analytics only involves a few steps:
- Log in to the Cloudflare dashboard, and select your account.
- Select the Analytics & Logs drop-down and choose Web Analytics.
- Under Quick Actions, select Add a site.
- Select a hostname from the drop-down menu > Done.
Access
Once you have enabled Web Analytics, you can review analytics at any time:
- Log in to the Cloudflare dashboard, and select your account.
- Select the Analytics & Logs drop-down and choose Web Analytics.
- Select your zone.
- Review the various metrics provided by Cloudflare.
Notifications
Web Analytics uses Cloudflare’s Notification service. When enabled, Web Analytics sends you a weekly report with aggregate visits, page views and median page load time for all your sites, so you can monitor their performance.
To get started, add Web Analytics notification on your Cloudflare dashboard. Refer to Cloudflare Notifications to learn more.
Cloudflare Zaraz
If you already use third-party tools on your website, check out Cloudflare Zaraz.
Cloudflare Zaraz gives you complete control over third-party tools and services for your website, and allows you to offload them to Cloudflare’s edge, improving the speed and security of your website. With Cloudflare Zaraz you can load tools such as analytics tools, advertising pixels and scripts, chatbots, marketing automation tools, and more, in the most optimized way.
Cloudflare Zaraz is built for speed, privacy, and security, and you can use it to load as many tools as you need, with a near-zero performance hit.