Set Up Google Analytics 4 with CloudFlare Zaraz

  • Webume
  • Saturday, Jan 27, 2024
blog-image

Welcome to your quick guide on integrating Google Analytics with your website through Cloudflare Zaraz. Cloudflare’s vast network enhances the security and performance of online services, making the user experience smoother and more secure. Cloudflare Zaraz, a newer addition to their suite, elevates this by offering seamless integration of third-party tools such as Google Analytics. Let’s dive into how you can leverage Cloudflare Zaraz for improved website insights without compromising speed or security.

Google is sun-setting its Universal Analytics properties and moving to Google Analytics 4. Please complete the setup of your Google Analytics 4 property before your connected Universal Analytics property gets deleted on July 1, 2024.

Why Choose CloudFlare Zaraz for Google Analytics Integration?

Using CloudFlare Zaraz for your Google Analytics setup will:

  • Add Google Analytics on every page (even in error pages)
  • Allow you to add and manage tools without directly altering your site’s code.

Find your Google Analytics 4 Measurement ID

Measurement ID is a unique ID that points to your Google Analytics 4 web property. You need this to complete your transition from universal google analytics to the new Google Analytics 4 platform to continue using Google Analytics. During the auto-setup, Google will ask you to import the previous data collection settings and assign you a new property.

A modal that pops-up showing the measurement id in Google Analytics settings

Measurement ID is also vital for your ability to use it with CloudFlare Zaraz. You can access this ID by logging into your Google Analytics dashboard. If you have multiple analytics properties, select the one that you want to set up. Then follow the steps below to get your ID.

  1. Go to Settings (gear icon) available on the left sidebar.
  2. Under “Data collection and modification” section, click on “Data Streams”
  3. Choose the “Web” tab on the next screen
  4. Next tap on the property that is shown.
  5. A modal should pop up showing the measurement ID you can use.

Setting Up Google Analytics with CloudFlare Zaraz

Follow these simplified steps to connect Google Analytics to your site through CloudFlare Zaraz:

Basic Setup

  1. Log In: Start by signing into your CloudFlare account.
  2. Access Zaraz: Navigate to Zaraz > Tools in the sidebar, then click ‘Add New Tool’ under Third-Party Tools.
  3. Select GA4 Tool: Pick Google Analytics 4 from the tool list.
  4. Enter Measurement ID: Provide your GA4 Measurement ID and save.

Advanced Setup: Tracking Actions and Triggers

  1. Default Tracking: Default sets the Pageview action.
  2. New Trigger: Click “Triggers” in the sidebar, then “Create trigger”. Name your trigger, set match rules, and save.
  3. New Action: Back in Tools, edit your settings. Click “Create action”, name the action, choose the trigger you made, set event details, and save.

Monitoring Your Integration

After you save your configuration settings, allow a day to let the data flow in. Then check your dashboard for analytics to accumulate.

  • Real-Time Data: Check Google Analytics to see your data streaming live.
  • Event Tracking: Monitor events in the Events section of Zaraz.

By following these concise steps, you’ll have Google Analytics integrated with your site through CloudFlare Zaraz efficiently. This ensures that you get valuable insights without compromising website performance.

If questions arise as you work through these steps, drop a comment below. Share this guide with others who may find it helpful. Thank you for following along!

Category: Web Development
Tags: Guide , Web , Google , Analytics