Google Analytics Glossaire

Integrate Google Analytics with Cloudflare Zaraz

Image of Iron Brands

Publié le 30 mars 2024 et modifié le 7 mai 2024 par Iron Brands

Ce contenu n'est pas encore traduit en français. Vous trouverez ci-dessous la version anglaise.

Cloudflare Zaraz can minimize the performance impact of GA and help optimize user experience on your website. In this blog post, we'll explore how to integrate Google Analytics with Cloudflare Zaraz.

Let's dive in!

  1. Create a Google Analytics 4 Property
  2. Integrate Google Analytics
    1. Access Zaraz in Your Cloudflare Dashboard
    2. Add Google Analytics to Your Cloudflare Zaraz Tools
    3. Configure Your Google Analytics Tool in Zaraz
  3. Verify the Integration
  4. Final Thoughts

Before we dig in you need to know that Google Analytics is complex and a bit clunky. There are other options that give you the same insights in a slick and straightforward dashboard.

Simple Analytics is one of them. A privacy-friendly and simple analytics tool - just the insights you need in a straightforward dashboard. (And its also free yes).

Can you spot the difference between the dashboards?

All right, now let's get into answering your question!

Create a Google Analytics 4 Property

If you haven't set up Google Analytics for your website, now is the time to do so. Here’s a quick rundown:

  • Visit the Google Analytics website and log in with your Google account.
  • Follow the prompts to create a new GA4 property for your website.
  • Once your property is created, note your Measurement ID (formatted as "G-XXXXXXX"), as you'll need it for integration with Zaraz.

Integrate Google Analytics

Access Zaraz in Your Cloudflare Dashboard

  • Log in to your Cloudflare dashboard and select the site you wish to integrate with Google Analytics.
  • Navigate to the "Zaraz" option in the dashboard menu, located under the "Speed" section.

Add Google Analytics to Your Cloudflare Zaraz Tools

  • Within the Zaraz dashboard, click on the "Tools" section.
  • Look for Google Analytics in the list of available tools. If it's not immediately visible, use the search function to find it.
  • Click on "Google Analytics" and then on the "Add" button.

Configure Your Google Analytics Tool in Zaraz

  • Enter your Google Analytics Measurement ID in the required field.
  • Customize additional settings as needed. Zaraz allows you to configure various aspects of how Google Analytics is loaded and interacts with your site.
  • Save your changes. Zaraz will now load Google Analytics on your website via Cloudflare's edge network, improving load times and efficiency.
  • (Optional) Create Additional Properties: To add Google Analytics to multiple websites, create multiple GA properties and use a different Measurement ID for each website. This prevents GA from conflating the data.

Verify the Integration

To ensure that Google Analytics is properly integrated and tracking data:

  • Visit your website after configuring GA in Zaraz.
  • Check your Google Analytics Realtime report to see if the visit is captured. This confirms that the integration is successful and that GA is collecting data as expected.

Final Thoughts

Adding Google Analytics to your project can give you great insights. However, ask yourself: is Google Analytics the right tool for you?

GA is an overpowered solution for straightforward analytics. If you're looking for a simple and intuitive dashboard with the insights you need, there are better alternatives.

If this resonates with you, feel free to give Simple Analytics a spin. You just need to add the script to your app and off you go. This takes about one minute- and there is a free version as well!

Enjoy!