ยท7 min read

Install Google Analytics 4: complete step-by-step 2026 guide

Install GA4 on any site in 2026: create a property, install the tag, verify tracking. Complete tutorial with and without GTM.

install google analytics 4ga4 installinstall google analyticsga4 setup

By Matheo Zimmer

Google Analytics 4 is free and available for any website. The install takes less than 30 minutes if you follow the steps in order. Here's the complete tutorial for 2026, from zero to verifying data is coming in.


Before you start: what you need

  • A Google account (Gmail or Google Workspace)
  • Admin or editor access to the site to track
  • 20 to 30 minutes

That's it. GA4 is entirely free.


Step 1: create an account and a GA4 property

Create the account

  1. Go to analytics.google.com
  2. Click "Start measuring"
  3. Account name: the name of your agency or your client (e.g. "Dupont Agency")
  4. Accept the data-sharing settings (or adjust based on your GDPR policy)
  5. Click "Next"

Create the GA4 property

  1. Property name: the name of the site (e.g. "mysite.com")
  2. Time zone: select your local time zone
  3. Currency: EUR / USD / etc.
  4. Click "Next"

Fill in the business information

Select the size and industry. This information is not critical: it personalises the default reports but doesn't affect the data.

Create a web data stream

  1. Click "Web" (not App)
  2. Enter the site URL (e.g. https://mysite.com)
  3. Give the stream a name (e.g. "mysite.com - web")
  4. Leave "Enhanced measurement" enabled: it will automatically track scrolls, outbound clicks, and file downloads

GA4 then generates a Measurement ID in the format G-XXXXXXXXXX. Note it: you need it for the next step.


Step 2: install the GA4 tag on the site

Three methods depending on your environment.

Method A: direct install (via Google Tag)

The simplest method if you have access to the site's HTML code.

GA4 gives you a snippet to paste in the <head> of every page:

<!-- 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>

Replace G-XXXXXXXXXX with your Measurement ID.

For Next.js / React: use the Next.js <Script> component or the official @next/third-parties package:

// app/layout.tsx
import { GoogleAnalytics } from '@next/third-parties/google'

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <GoogleAnalytics gaId="G-XXXXXXXXXX" />
      </body>
    </html>
  )
}

If you use GTM (or if you'll manage other tags), install GA4 through GTM rather than directly in the code.

  1. In GTM โ†’ Tags โ†’ New
  2. Type: Google Analytics: GA4 Event
  3. Configuration: enter your GA4 Measurement ID (G-XXXXXXXXXX)
  4. Trigger: All Pages
  5. Save and Publish the GTM version

Benefit: you'll be able to add other tags (Ads, pixels, etc.) without touching the site code.

Method C: WordPress

Option 1: Google Site Kit plugin (official Google):

  1. Install the "Site Kit by Google" plugin
  2. Connect your Google account
  3. Follow the wizard to link GA4

Option 2: dedicated plugin (lighter):

  • "GA4 for WordPress" or "MonsterInsights"
  • Simply paste the Measurement ID into the plugin's settings

Method D: Shopify

  1. Shopify admin โ†’ Online Store โ†’ Preferences
  2. "Google Analytics" section โ†’ enter the Measurement ID
  3. Enable "Use Enhanced Ecommerce" if you want purchase tracking

Step 3: verify that the install works

Don't skip this step. A poorly installed tag collects zero data and you won't notice for 3 months.

Test 1: real-time report

  1. Open an incognito window
  2. Visit the site
  3. In GA4 โ†’ Reports โ†’ Realtime
  4. You should see yourself appear as an active visitor in the "Users in last 30 minutes" section

If nothing appears after 30 seconds, the tag is not correctly installed.

Test 2: Chrome extension (for diagnostics)

Install Google's "Tag Assistant Companion" extension:

  1. Enable the extension on the site page
  2. It shows whether the GA4 tag is detected and sending data correctly
  3. A green circle = everything works

Test 3: DebugView (to verify events)

  1. In GA4 โ†’ Admin โ†’ DebugView
  2. Visit the site with the Tag Assistant extension active
  3. You see every event sent in real time with its parameters

Step 4: minimum configuration after install

Once the tag is verified, three settings to apply immediately.

Keep data for 50 months

By default GA4 only keeps data for 14 months. Change this now.

  1. Admin โ†’ Data collection and modification โ†’ Data retention
  2. Select "50 months"
  3. Save

If you forget and a client asks for data from 2 years ago in 18 months, it will be gone.

Exclude internal traffic

So your own visits don't pollute the data:

  1. Admin โ†’ Data streams โ†’ [your stream] โ†’ Define internal traffic
  2. Add your IP address (visible on whatismyip.com)
  3. Name the filter "Internal traffic"

Configure a conversion

Without a conversion, GA4 doesn't know which action really matters for this site.

  1. Admin โ†’ Conversions โ†’ Create conversion event
  2. Enter the name of the key event based on the site:
    • form_submit (showcase site with a form)
    • purchase (e-commerce)
    • sign_up (SaaS)
  3. Save

The complete walkthrough is in the GA4 conversions guide.


Common install problems

"I can't see myself in real time"

Possible causes:

  • You're browsing without incognito (GA4 may filter you if you are excluded as internal traffic)
  • The tag is cached: clear the cache or wait a few minutes
  • The snippet is in <body> instead of <head>: it works but with a delay
  • The tag is blocked by an ad blocker: test without browser extensions

"The tag is present but data isn't coming in"

  • Check that the Measurement ID is correct (format G- followed by 10 characters)
  • If there was an old Universal Analytics, verify it isn't blocking GA4
  • If you use GTM, verify the container is published (not just saved)

"I have data but the numbers look wrong"

GA4 data has a 24 to 48-hour processing delay. The real-time report is reliable for verifying the install: other reports need 2-3 days of data to be coherent.


Platform-specific install guides

This guide covers the general install. For a procedure tailored to your exact platform:

What's next?

GA4 installed and verified, the next steps:

If you manage GA4 installs for multiple clients, NarratIQ centralises their properties in a single dashboard and generates the monthly PDF report in 30 seconds, without having to reopen GA4 for each client every month.

Frequently asked questions

20 to 30 minutes for a full install: account creation, property, data stream, adding the tag to the site, and verifying tracking. If you use Google Tag Manager, add 10 minutes. On WordPress with a dedicated plugin, the install drops to 10 minutes. Configuring conversions and custom events happens later, in 30 minutes to 2 hours depending on need.

Ready to automate your GA4 reports?

Connect your Google Analytics 4 in 5 minutes. 14-day free trial, no credit card.

Try NarratIQ free