Setup guide

How to connect Google Analytics 4

Google Analytics 4 (GA4) is Google's current analytics platform — it measures users, sessions, page views, and engagement events. This guide walks from creating a fresh property all the way to linking it here.

Note on the old "Google Analytics": Universal Analytics (UA / GA3) was permanently sunset in July 2023. If you were using UA-XXXXXXX-X tracking IDs, those properties stopped collecting data. GA4 — which uses G-XXXXXXXXXX measurement IDs — is the only version currently available. This guide covers GA4 exclusively.

  1. 1

    Create a GA4 property

    Open analytics.google.com Admin+ Create property. Enter your property name and time zone, then click Next to set your industry and business size.

  2. 2

    Add a Web data stream

    After creating the property you will be prompted to choose a platform. Select Web, enter your site URL and a stream name (e.g. "Main website"), then click Create stream. Note your Measurement ID — it starts with G-.

    Your Measurement ID looks like: G-A1B2C3D4E5 — copy it now, you will need it in Step 3.

  3. 3

    Install the measurement tag

    GA4 needs a JavaScript snippet on every page of your site. You have two routes:

    Option A — gtag.js (direct)

    Paste this snippet inside the <head> of every page, replacing G-XXXXXXXXXX with your Measurement ID:

    <!-- Google tag (gtag.js) -->
    <script async
      src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX">
    </script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'G-XXXXXXXXXX');
    </script>

    Option B — Google Tag Manager (recommended for agencies)

    Install the GTM container snippet once, then add a Google Analytics: GA4 Configuration tag inside GTM pointing at your Measurement ID. GTM lets you manage all tags without touching site code again.

  4. 4

    Confirm data is flowing

    In GA4, open Reports → Realtime and visit your own website in another tab. Within 30 seconds you should see yourself counted as an active user. Full historical data typically appears within 24–48 hours.

    Troubleshooting: If no users appear after 60 seconds, check that you pasted the full snippet (including both <script> tags) in the correct position inside <head>, and that ad-blockers are disabled in your test browser.

  5. 5

    Connect here

    Head to the dashboard and click Connect Google Analytics. Authorise with the Google account that owns the GA4 property. We will automatically match your GA4 property to the site by domain.