SEO100
SEO method 92 of 100

Google Analytics 4 Setup: Track Organic Traffic from Day One

Beginner High impact Under an hour Analytics and measurement

Updated · First published

Short answerGoogle Analytics 4 is the only Google Analytics left: Universal Analytics stopped processing data in July 2023. Create a property and web data stream, install the G- tag, link Search Console, set event retention to 14 months and add consent mode if you have EEA visitors.

Google Analytics 4 (GA4) setup means creating a GA4 property, adding a web data stream, installing Google’s tag on every page and connecting the property to Search Console. Do it before you publish anything you want to measure, because GA4 cannot show data from before the tag went live.

What is Google Analytics 4?

GA4 is Google’s current analytics product. It records everything as events (page views, scrolls, clicks, purchases) instead of the session-and-pageview model of the old Universal Analytics. Universal Analytics stopped processing data in July 2023 (360 properties followed in July 2024), so any guide that mentions a UA- property ID is out of date.

Why does it matter for SEO?

Google Search Console tells you who clicked from Google. GA4 tells you what those visitors did next: which landing pages hold attention, which organic visits end in a signup or sale, and how organic traffic compares with email, social and ads. Without that second half you can count traffic but not judge it (see conversion tracking and measuring what SEO earns).

How do you set up GA4, step by step?

  1. Create an account and a property. At analytics.google.com choose Start measuring, or in Admin press Create and pick Account or Property. Set the reporting time zone and currency once, because changes later split your history.
  2. Add a web data stream. In Admin, Data collection and modification, Data streams press Add stream, Web, enter your URL and name the stream. Leave enhanced measurement on: it collects page views, scrolls, outbound clicks, site search, video engagement and file downloads without extra code.
  3. Install the tag. Copy the Measurement ID (it starts with G-). WordPress, Shopify and Squarespace have a field for it. Otherwise paste the gtag snippet right after the <head> tag on every page, or add a Google Analytics configuration tag in Google Tag Manager.
  4. Check that data arrives. Open the Realtime report, then visit your site in another tab. Data can take up to 30 minutes to appear in Realtime and longer in standard reports.
  5. Link Search Console. In Admin, Product links, Search Console links connect your verified property. You get a Search Console report collection inside GA4 that places queries and landing pages beside on-site behaviour.
  6. Set data retention. In Admin, Data settings, Data retention standard properties can keep user-level and event data for 2 or 14 months. Choose 14 months. Google applies a change after 24 hours, and large properties stay limited to 2 months.
  7. Mark your goals as key events. Any event you collect can become a key event, which is what GA4 has called conversions since March 2024 (see conversion tracking).
  8. Filter your own traffic. Define internal traffic by IP address under the data stream’s tag settings, then activate the internal traffic data filter so staff visits do not distort the numbers.
  9. Handle consent. See the next section if any visitors come from the EEA.

If you have visitors in the European Economic Area, your cookie banner (a consent management platform) has to pass the visitor’s choice to Google tags. Consent mode does that through four signals: ad_storage, analytics_storage, ad_user_data and ad_personalization. The last two arrived with consent mode v2 in November 2023.

Google’s developer guide gives three rules:

  • No default values exist. You set a default for every consent type before any measurement command runs.
  • Defaults can be set per region. The more specific region wins when they overlap.
  • Send an update when the visitor changes the choice. The easiest way is a CMP with a Google Tag Manager consent template.

In advanced mode, tags still load and send limited pings when consent is denied, which GA4 uses for modeling. Which mode you pick is a legal decision for your own company, so ask whoever handles your privacy policy. Consent mode does not collect consent itself, you still need the banner.

Should you use something other than GA4?

GA4 is free and connects to Search Console and Google Ads. It also has a steep interface and needs consent handling. Plausible and similar privacy-friendly tools show simple traffic and goal numbers without cookies. PostHog adds product analytics, session replay and feature flags. Running a lighter tool next to GA4 is fine, as long as you keep one source of truth for reports.

How do you check that the setup works?

  • Realtime shows your own visit within minutes.
  • Reports, Acquisition, Traffic acquisition lists Organic Search as a channel after a day or two.
  • Each goal event shows counts after you trigger the action yourself.
  • DebugView (Admin) shows each event as it fires when you turn on debug mode in Tag Assistant.
  • Search Console link status reads linked, and queries appear after a few days.

What mistakes should you avoid?

  • Two tags on one page. Hard-coded gtag plus a plugin double-counts page views.
  • No cross-domain setup. Checkout on another domain turns your own site into a referral source.
  • Leaving retention at 2 months. Year-on-year comparisons in Explorations need 14.
  • Treating the old UA numbers as comparable. GA4 counts users and sessions differently.
  • Skipping the consent banner. Adding the tag without a lawful consent flow for EEA visitors is a legal risk on top of a data gap.

Where can you learn more?

The free digital marketing module of the Fe/male Switch startup school covers analytics setup for a new site. Next steps: define your key events, build a report in Looker Studio, and learn what engagement rate means in GA4.

Earlier versions of this directory listed this as: Google analytics setup, Google Analytics 4 Setup.

Learn SEO as part of building a startup

Fe/male Switch is a startup school and game where you build a real company step by step. Its free digital marketing module covers SEO, and the free startup tools help with the rest.