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
- Go to analytics.google.com
- Click "Start measuring"
- Account name: the name of your agency or your client (e.g. "Dupont Agency")
- Accept the data-sharing settings (or adjust based on your GDPR policy)
- Click "Next"
Create the GA4 property
- Property name: the name of the site (e.g. "mysite.com")
- Time zone: select your local time zone
- Currency: EUR / USD / etc.
- 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
- Click "Web" (not App)
- Enter the site URL (e.g.
https://mysite.com) - Give the stream a name (e.g. "mysite.com - web")
- 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>
)
}
Method B: via Google Tag Manager (recommended)
If you use GTM (or if you'll manage other tags), install GA4 through GTM rather than directly in the code.
- In GTM โ Tags โ New
- Type: Google Analytics: GA4 Event
- Configuration: enter your GA4 Measurement ID (
G-XXXXXXXXXX) - Trigger: All Pages
- 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):
- Install the "Site Kit by Google" plugin
- Connect your Google account
- 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
- Shopify admin โ Online Store โ Preferences
- "Google Analytics" section โ enter the Measurement ID
- 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
- Open an incognito window
- Visit the site
- In GA4 โ Reports โ Realtime
- 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:
- Enable the extension on the site page
- It shows whether the GA4 tag is detected and sending data correctly
- A green circle = everything works
Test 3: DebugView (to verify events)
- In GA4 โ Admin โ DebugView
- Visit the site with the Tag Assistant extension active
- 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.
- Admin โ Data collection and modification โ Data retention
- Select "50 months"
- 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:
- Admin โ Data streams โ [your stream] โ Define internal traffic
- Add your IP address (visible on whatismyip.com)
- Name the filter "Internal traffic"
Configure a conversion
Without a conversion, GA4 doesn't know which action really matters for this site.
- Admin โ Conversions โ Create conversion event
- Enter the name of the key event based on the site:
form_submit(showcase site with a form)purchase(e-commerce)sign_up(SaaS)
- 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:
- Install GA4 on WordPress: Site Kit, dedicated plugin or GTM depending on your setup
- Install GA4 on Shopify: native Shopify method, custom pixel and e-commerce verification
- Install GA4 on Next.js: App Router, Pages Router, GDPR consent and SPA tracking
What's next?
GA4 installed and verified, the next steps:
- The 5 essential GA4 reports for beginners: where to start reading the data
- Connect Google Tag Manager to GA4: if you want to manage tracking without touching code
- Configure GA4 conversions: make GA4 useful for the business
- Connect Search Console to GA4: to see SEO keywords inside GA4
- GA4 and GDPR cookies consent: compliance setup
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.