← Back to insights
Guide · #701

How to Set Up Google Analytics 4 for SEO

Step-by-step GA4 setup for SEO tracking. Configure events, dimensions, and GSC integration. Ship organic visibility fast.

Filed
May 5, 2026
Read
17 min
Author
The Seoable Team

Prerequisites: What You Need Before Starting

Before you configure Google Analytics 4 for SEO, make sure you have these in place:

  • A live website or web app with traffic (even if it's minimal)
  • A Google account (Gmail works fine)
  • Admin access to your website's code or a tag manager setup
  • Google Search Console already connected to your domain (if you haven't done this yet, set it up in 10 minutes first)
  • Basic understanding of your site structure and what pages matter most to your business

If you're starting from zero, don't panic. This guide walks you through everything. You'll have a working GA4 setup with SEO tracking in under an hour.

Why GA4 Matters for SEO (And Why the Default Setup Fails)

GA4 is not Google Analytics 3. The defaults are broken for SEO tracking. Out of the box, GA4 doesn't give you what you need: organic search keywords, landing page performance, or conversion funnels from organic traffic.

The problem? GA4 hides critical SEO data behind configuration walls. If you don't set it up right, you'll be flying blind on organic performance while competitors measure every conversion.

Here's what you'll miss without proper setup:

  • No visibility into which search queries drive traffic (you need Google Search Console linked)
  • No custom events tracking content engagement, form submissions, or video plays
  • No dimensions that break down performance by landing page or user intent
  • Data disappearing after 2 months (GA4's default retention is brutal)
  • No way to attribute conversions back to organic search traffic

This guide fixes all of that. By the end, you'll have a GA4 setup that actually tells you if your SEO is working.

Step 1: Create a GA4 Property and Add Your Website

Start here if you don't have GA4 set up yet.

1.1: Sign into Google Analytics

Go to Google Analytics and sign in with your Google account. If you've never used Analytics before, you'll see a "Start measuring" button. Click it.

1.2: Create a new account

Enter your account name (usually your company name or brand). You can keep "Data sharing settings" at the default. Click "Next.**

1.3: Set up your property

Enter your property name (your website name or domain). Set your reporting timezone to your local timezone—this matters for daily reports. Select your industry category (pick the closest match; it helps GA4 suggest relevant reports).

Click Next.

1.4: Create a data stream

GA4 calls websites "data streams." Select "Web" as your platform. Enter your website URL and stream name (usually your domain). Click Create stream.

GA4 will generate a Measurement ID (looks like G-XXXXXXXXXX). Copy this. You'll need it next.

Pro Tip: If you're already running Universal Analytics (GA3), don't delete it yet. Run both in parallel for 3 months so you have historical data overlap. After 3 months, you can safely retire GA3.

Step 2: Install the GA4 Tracking Code on Your Site

You have two options: the Google tag (recommended) or Google Tag Manager.

Option A: Direct Installation (Fastest)

If you have direct access to your website's HTML or use a platform like Webflow, Wordpress, or Shopify, use the direct method.

2.1: Copy the tracking snippet

In GA4, click Admin (bottom left) → Data Streams → select your web stream. You'll see a Google tag section with a code snippet that looks like this:

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

2.2: Paste into your site's <head> tag

Add this code to the <head> section of every page on your site. For most platforms:

  • Wordpress: Use a plugin like MonsterInsights or Google Analytics for WordPress by MonsterInsights to paste the ID without touching code.
  • Webflow: Go to Site Settings → Custom Code → Head Code, paste the snippet.
  • Shopify: Go to Settings → Apps and Integrations → Google Analytics, enter your Measurement ID.
  • Nextjs/React: Install gtag.js via npm and configure it in your layout component.
  • Custom site: Paste directly into your base template or header include.

2.3: Verify the installation

Go to your website in a browser and open DevTools (F12 or right-click → Inspect). Go to the Network tab, reload the page, and search for googletagmanager.com. You should see requests firing. If nothing shows up, the code isn't installed correctly.

Warning: If you're using Google Tag Manager, skip this section and go to Option B below.

Option B: Google Tag Manager (More Flexible)

If you want to manage multiple tracking tools from one place, or if you don't want to touch your site's code, use GTM.

2.4: Create a GTM container

Go to Google Tag Manager. Click Create Account. Enter your account name and container name (your domain). Select Web as your target platform.

GTM will generate a Container ID (looks like GTM-XXXXXX). Copy it.

2.5: Install the GTM container code

Paste the GTM container code into your site's <head> and <body> tags (GTM requires two snippets). Instructions are the same as above depending on your platform.

2.6: Create a GA4 tag in GTM

In GTM, go to TagsNew. Select Google Analytics: GA4 Configuration. Paste your GA4 Measurement ID. Create a trigger for All Pages. Save and publish.

Pro Tip: Use GTM if you plan to add conversion tracking, form tracking, or video tracking later. It's easier to manage everything from one dashboard.

Step 3: Link Google Search Console to GA4

This is critical. Without this, you won't see organic search keywords in GA4.

3.1: Verify your domain in Google Search Console first

If you haven't already, verify your domain in Google Search Console using one of four methods: DNS, HTML file, meta tag, or Google Analytics. This takes 5 minutes.

3.2: Link GSC to GA4

In GA4, go to AdminProperty Settings → scroll down to Google Search Console. Click Link.

Select your verified domain from the dropdown. Click Confirm.

GA4 will now pull search query data from Google Search Console. This takes 24-48 hours to populate.

3.3: Verify the connection

After 24 hours, go to ReportsAcquisitionGoogle Organic Search. You should see organic traffic data. If it's still blank after 48 hours, your domain might not be verified in GSC. Double-check your verification status.

Why this matters: Without GSC linked, GA4 shows you organic traffic volume but not the keywords driving that traffic. You'll see "organic search" as a traffic source, but not "which search queries converted."

Step 4: Configure GA4 Data Retention

GA4's default data retention is 2 months. That's insane. Your historical data disappears automatically.

4.1: Change retention to 14 months

Go to AdminData SettingsData Retention. Change from 2 months to 14 months. Click Save.

This costs nothing extra. It just means GA4 keeps your data longer so you can compare month-over-month and year-over-year trends.

Pro Tip: If you need data older than 14 months, export reports to Looker Studio every month. It takes 5 minutes and builds a permanent archive.

Step 5: Create Custom Dimensions for SEO Tracking

GA4's default dimensions don't break down performance by what matters for SEO. You need custom dimensions to track landing pages, content type, and user intent.

5.1: What dimensions to create

Create these four custom dimensions:

  1. Content Type (blog post, product page, landing page, etc.)
  2. Landing Page Category (homepage, pricing, docs, etc.)
  3. Search Intent (informational, transactional, navigational)
  4. Author (if you have multiple writers)

5.2: Set up custom dimensions

Go to AdminCustom DefinitionsCustom Dimensions. Click Create Custom Dimension.

For each dimension:

  • Enter the dimension name (e.g., "Content Type")
  • Select Page or Event as the scope (use Page for most SEO dimensions)
  • Enter the parameter name (e.g., content_type)
  • Click Save

Repeat for all four dimensions.

5.3: Add dimensions to your site

Now you need to pass these values to GA4 when pages load. If you're using GTM, create a new tag for each dimension:

  1. Go to TagsNewGoogle Analytics: GA4 Event
  2. Set Event Name to page_view
  3. Under Event Parameters, add:
    • Key: content_type | Value: blog (or whatever applies)
  4. Create a trigger for pages matching that type
  5. Publish

If you're using direct code, add this to your page template:

gtag('event', 'page_view', {
  'content_type': 'blog',
  'landing_page_category': 'resources',
  'search_intent': 'informational'
});

Warning: Custom dimensions won't show historical data. They only work going forward. Set them up now, not later.

Step 6: Set Up Custom Events for SEO Engagement

Pageviews alone don't tell you if content is good. You need engagement metrics.

6.1: Events to track

Set up these four GA4 events for SEO:

  1. Scroll Depth (user scrolled 50%, 75%, 90% of page)
  2. Time on Page (user spent 30+ seconds on page)
  3. CTA Click (user clicked a call-to-action button)
  4. Form Submit (user submitted a contact form, newsletter signup, etc.)

6.2: Configure scroll tracking in GTM

This is the most useful event for SEO. It tells you which content actually engages readers.

In GTM:

  1. Go to VariablesUser-Defined VariablesNew

  2. Select Scroll Depth as the variable type

  3. Set thresholds: 50, 75, 90 (percentages)

  4. Name it "Scroll Depth Tracker" and save

  5. Create a new TagGoogle Analytics: GA4 Event

  6. Event Name: scroll_depth

  7. Add event parameter: depth_threshold | {{Scroll Depth Tracker}}

  8. Trigger: Scroll Depth (select the variable you just created)

  9. Save and publish

Now GA4 will fire an event every time a user scrolls 50%, 75%, or 90% down your pages. You can see which content gets read vs. skimmed.

6.3: Track form submissions

This matters for SEO because it shows which organic landing pages actually convert.

In GTM:

  1. Create a new TriggerForm Submission

  2. Name it "Form Submit"

  3. Wait for Tags to Fire (optional, but recommended for accuracy)

  4. Save

  5. Create a new TagGoogle Analytics: GA4 Event

  6. Event Name: form_submit

  7. Add event parameters:

    • form_name | {{Form Name}} (GTM auto-captures this)
    • form_destination | {{Page URL}} (the page where form was submitted)
  8. Trigger: Form Submit

  9. Save and publish

Now you'll see which pages drive form submissions from organic search.

Pro Tip: Use Tag Assistant to verify all events are firing correctly before you go live. Silent tracking failures are common and cost you data.

Step 7: Create SEO-Focused Reports and Dashboards

GA4's default reports are noise. Create custom reports that actually show SEO performance.

7.1: The five reports every founder needs

Set up these five GA4 reports:

Report 1: Organic Search Traffic by Landing Page

Go to ReportsAcquisitionGoogle Organic Search. Click the pencil icon to customize. Add a secondary dimension: Landing Page. Now you see which pages drive organic traffic.

Report 2: Organic Traffic with Engagement Metrics

Go to ReportsAcquisitionGoogle Organic Search. Add columns for Engagement Rate, Avg. Session Duration, and Conversion Rate. This shows which organic pages actually engage users.

Report 3: Content Performance by Type

Create a custom report:

  1. Click ReportsCreate new report
  2. Add dimension: Content Type (your custom dimension)
  3. Add metrics: Users, Sessions, Engagement Rate, Conversions
  4. Save as "Content Performance by Type"

This shows whether blog posts, product pages, or landing pages drive more conversions.

Report 4: Scroll Depth by Page

Create a custom report:

  1. Click ReportsCreate new report
  2. Add dimension: Landing Page
  3. Add metric: Event Count (filter to scroll_depth events only)
  4. Add secondary metric: Users
  5. Sort by Event Count descending
  6. Save as "Content Engagement by Page"

This shows which pages people actually read.

Report 5: Organic Traffic with Conversions

Go to ReportsAcquisitionGoogle Organic Search. Add a secondary dimension: Conversion (if you've set up conversion tracking). Now you see which search queries drive conversions, not just clicks.

7.2: Build a one-page SEO dashboard

Instead of jumping between reports, create a dashboard that shows everything at a glance.

Go to ReportsDashboard. Click Create new dashboard. Add cards for:

  • Organic users (this month vs. last month)
  • Organic conversion rate
  • Top landing pages (by users)
  • Engagement rate (overall)
  • Form submissions from organic search

Pin this dashboard to your bookmarks. Check it weekly.

Pro Tip: If you want a more sophisticated dashboard, connect GA4 to Looker Studio and build a custom report that updates daily. Takes 30 minutes.

Step 8: Set Up Conversion Tracking for SEO

Traffic without conversions is vanity. Set up conversion tracking so you know if organic search actually drives business results.

8.1: Define your conversions

First, decide what counts as a conversion for your business:

  • Form submission (contact, demo request, newsletter signup)
  • Purchase (if you have e-commerce)
  • Account creation (if you have a SaaS product)
  • PDF download (if you have gated content)
  • Video play (if video is part of your funnel)

8.2: Create conversion events in GA4

Go to AdminConversionsCreate Conversion. For each conversion type:

  1. Click Create Conversion
  2. Select the event you want to track (e.g., form_submit, purchase)
  3. Toggle Mark as conversion
  4. Click Save

GA4 will now count these events as conversions in your reports.

8.3: Track e-commerce conversions

If you sell products, set up e-commerce tracking:

  1. Go to AdminData Streams → select your web stream
  2. Scroll to Enhanced Ecommerce and toggle it on
  3. In GTM, create a new tag:
    • Type: Google Analytics: GA4 Event
    • Event Name: purchase
    • Add event parameters for order value, items, etc.
  4. Publish

Now you'll see revenue driven by organic search.

Warning: E-commerce tracking requires passing product data to GA4. If you're using Shopify, WooCommerce, or BigCommerce, use their built-in GA4 integration instead of manual setup. It's more reliable.

Step 9: Verify Your Setup with Tag Assistant

Before you declare victory, verify everything is actually working.

9.1: Install Tag Assistant

Download Google Tag Assistant from the Chrome Web Store.

9.2: Run a full audit

Go to your website and click the Tag Assistant icon. It will scan for:

  • GA4 tracking code (should be present)
  • Google Tag Manager (if you're using it)
  • Google Search Console verification
  • Conversion tracking
  • Event firing

Fix any red flags before going live.

9.3: Check real-time data

In GA4, go to ReportsReal-time. Open your website in a new tab. Within 5 seconds, you should see yourself in the real-time report. If not, tracking isn't working.

Refresh the page, scroll, click buttons. Watch the real-time report update. If events aren't firing, go back to Step 6 and double-check your GTM configuration.

Pro Tip: Use Tag Assistant to catch silent tracking failures before they cost you months of data.

Step 10: Connect to Google Search Console for Full SEO Visibility

You linked GSC to GA4 in Step 3. Now actually use that connection.

10.1: Access the Google Organic Search report

Go to ReportsAcquisitionGoogle Organic Search. This report pulls directly from Google Search Console and shows:

  • Organic traffic volume
  • Click-through rate (CTR)
  • Average position in search results
  • Impressions
  • Top landing pages
  • Top search queries (if you've linked GSC properly)

10.2: Identify your best-performing keywords

Click the Queries tab (if available). You'll see which search queries drive the most traffic. Focus your content strategy on these.

10.3: Find low-hanging fruit

Look for keywords with high impressions but low CTR. These are ranking well but not converting clicks. Improve your meta titles and descriptions to boost CTR.

Example: A keyword has 500 impressions but only 10 clicks (2% CTR). Rewrite the meta title to be more compelling, and you could 2x your traffic without any ranking improvements.

10.4: Monitor ranking changes

GA4 doesn't track rankings directly (you need a tool like Ahrefs or Semrush for that). But GA4 shows traffic and CTR changes, which indicate ranking shifts. If organic traffic suddenly drops, check Google Search Console's Coverage report for indexing issues.

Step 11: Set Up Weekly Reporting

Tracking is useless if you never look at the data. Automate reporting so insights reach you every week.

11.1: Enable email reports

Go to AdminEmail notifications. Enable:

  • Anomaly alerts (GA4 flags unusual traffic drops)
  • Weekly summary
  • Custom alerts (e.g., "alert me if organic traffic drops 20%")

11.2: Create a custom alert for organic traffic drops

Go to AdminCustom Alerts. Create a new alert:

  • Condition: Organic traffic drops 20% day-over-day
  • Notify: Your email
  • Frequency: Daily

This catches problems early.

11.3: Export reports to a spreadsheet

Every Friday, export your key metrics to a spreadsheet:

  1. Go to ReportsAcquisitionGoogle Organic Search
  2. Click the download icon
  3. Save as CSV
  4. Paste into a weekly tracking sheet

After 3 months, you'll have a trend line showing whether SEO is working.

Pro Tip: If you want a fully automated dashboard that updates daily, build a Looker Studio report that connects GA4 and Google Search Console. It takes 30 minutes but saves hours of manual reporting.

Step 12: Integrate GA4 with Your SEO Tool Stack

GA4 is one piece. Connect it to your broader SEO toolkit.

12.1: Link to Google Search Console

You've already done this in Step 3. GA4 now shows you organic search keywords.

12.2: Connect to Google Search Console for rankings

Go to Google Search Console separately (not GA4). This is where you see:

  • Exact rankings for your keywords
  • Click-through rates
  • Impressions
  • Coverage issues (pages not indexed)
  • Mobile usability issues

GA4 shows traffic. GSC shows rankings. You need both.

12.3: Add to your free SEO tool stack

You now have:

  • GA4 (traffic and conversions)
  • Google Search Console (rankings and indexing)
  • Google Tag Manager (event tracking)
  • Looker Studio (dashboards)

This is a complete free SEO monitoring stack. You don't need Ahrefs or Semrush unless you're doing competitive analysis.

Common GA4 Setup Mistakes (And How to Avoid Them)

These are the errors that kill tracking:

Mistake 1: Not linking Google Search Console

Without GSC linked, you see organic traffic but not keywords. You can't optimize for what you can't measure.

Fix: Complete Step 3 today. Verify your domain in GSC first if you haven't.

Mistake 2: Default 2-month data retention

GA4 deletes data after 2 months by default. You lose historical comparisons.

Fix: Change data retention to 14 months in Step 4. Takes 30 seconds.

Mistake 3: No custom events

Pageviews don't show engagement. You can't tell if content is good or just getting traffic.

Fix: Set up scroll depth and form submission tracking in Step 6.

Mistake 4: Not verifying tracking works

Silent failures are common. Your code looks correct but doesn't fire.

Fix: Use Tag Assistant to verify before declaring success.

Mistake 5: Mixing GA3 and GA4 data

GA3 and GA4 count data differently. Comparing them directly leads to wrong conclusions.

Fix: Run both for 3 months, then pick one. Don't mix the numbers.

What to Do After Setup: Your First Month

Setup is done. Now what?

Week 1: Let data collect. GA4 needs 48 hours to show organic search keywords (via GSC). Don't panic if reports look empty.

Week 2: Check your reports. Go to ReportsAcquisitionGoogle Organic Search. You should see organic traffic, CTR, and impressions. If it's still blank, troubleshoot the GSC link.

Week 3: Identify your top landing pages. Which pages drive the most organic traffic? Which have the highest engagement? Which convert the most?

Week 4: Set a baseline. Record your organic traffic, conversion rate, and engagement metrics. You'll compare against this every month.

Month 2+: Optimize. If certain pages have high traffic but low engagement, rewrite them. If certain keywords have high impressions but low CTR, improve your meta titles. Use GA4 data to guide your content strategy.

The Bottom Line: You Now Have Organic Visibility

You've set up GA4 properly. You can now:

  • See which search queries drive traffic
  • Measure engagement on each page
  • Track conversions from organic search
  • Spot ranking changes via traffic shifts
  • Identify content that works and content that doesn't

Most founders skip this. They ship code but don't ship visibility. You're not one of them.

GA4 is just the foundation. The real work is using this data to improve your SEO. But you can't improve what you don't measure. You're measured now.

Next: Read your Google Search Console Performance report to understand your keyword rankings. Then request indexing for new pages to speed up discovery.

If you want to accelerate this further, get a complete SEO audit and 100 AI-generated blog posts in 60 seconds. But first, get GA4 right. Everything else depends on it.

Free weekly newsletter

Get the next one on Sunday.

One short email a week. What is working in SEO right now. Unsubscribe in one click.

Subscribe on Substack →
Keep reading