Choose a language

Web analyst setting up analytics on a laptop with a notebook

GA4 Setup Tutorial: Live and Verified in 30 Minutes

Published November 5, 2026 · Mis à jour le November 16, 2026 · 17 min read

GA4 goes live in three moves: create an account, property, and web data stream to get your Measurement ID; install the Google tag directly or through Google Tag Manager; then verify traffic in Realtime and DebugView. Most setups take 15 to 30 minutes depending on which install path you pick. The step that decides whether your setup actually worked is verification, and it's the one most tutorials bury.

This tutorial walks the whole sequence in order and closes every step with an explicit pass/fail test. You'll also find a troubleshooting matrix for the classic "no data in GA4" symptoms, a plain-language tour of what enhanced measurement captures on its own, and the admin settings to lock down before you call it done.

The path in 7 steps

The steps of this page, in order.

  1. 01 Create the property Make the account, property, and web data stream, and copy your Measurement ID.
  2. 02 Pick your path Choose the direct Google tag or Google Tag Manager, and follow only that branch.
  3. 03 Install and publish Place the tag on every page, or build and publish a GTM container.
  4. 04 Verify real traffic Confirm your own visit shows up in Realtime, then in DebugView.
  5. 05 Mark key events Flag the interactions that matter so they count in your reports.
  6. 06 Lock the admin basics Set data retention, internal traffic, and unwanted referrals.
  7. 07 Know the limits Understand sampling, thresholding, and consent so you read numbers honestly.

01 / 12

How long does a GA4 setup take, and what do I need first?

GA4 typically goes from zero to verified in about 15 to 30 minutes, and you need only a Google account, edit access to your site's code or a tag manager, and one decision made upfront.

Budget about 15 to 30 minutes: three stages, create the account, property, and web data stream; install the Google tag (the snippet that sends data to Google); then verify that data is flowing. Google recommends finishing the first stage before touching any APIs.

Pick one install path on day one: paste the Google tag directly into your site, or use Google Tag Manager. Direct is faster for a single small site; GTM pays off when you'll add more tags later. The minimum viable setup: one property, one web data stream, one tag on every page, Realtime showing your own visit, and one key event.

Google account with edit access to your site

Confirm you can sign in and that you can edit your site's code or tag manager. Without edit access, you can't install the tag.

Your site's code or a tag manager

Know where your site's header code lives, or which tag manager you use. You'll need to paste the Google tag or publish a container.

Your install path decision

Choose direct Google tag or Google Tag Manager before you open GA4. This tutorial asks you to follow one branch only.

Diagram of the configuration steps of an analytics property

02 / 12

What does GA4 track automatically without extra code?

With enhanced measurement switched on, GA4 captures a default set of interactions, page views, scrolls, outbound clicks, site search, video engagement, and file downloads, without you writing any code.

Enhanced measurement is a switch in your data stream settings that turns on a default set of events GA4 collects for you. Each event has its own toggle, and the events land in your reports alongside anything you send yourself.

Turn off what you don't need, extra events add noise, not errors. Open the event list in your data stream settings right after launch so you know what you get for free and what still needs custom code.

03 / 12

How do I create the account, property, and data stream?

In GA4, you create an account, then a property inside it, then a web data stream inside the property, and the data stream is where you copy the Measurement ID you'll need for installation.

Open the admin menu (the gear icon at the bottom left), then Create account. Name the account after your organization, not the site, because one account can hold several properties later.

Inside the account, choose Create property, set the reporting time zone and currency (these drive every report, so pick the ones you actually operate in), select Web as the platform, and enter your site URL. When the data stream is created, GA4 shows your Measurement ID, which starts with G-. Copy it, both installation paths in the next section need it.

  1. Open the admin menu

    Click the gear icon at the bottom left of the GA4 interface. Pass test: the Admin panel opens with Account and Property columns.

  2. Create the account

    Click Create account, enter an account name (your company, not the site), and accept the data-sharing settings. Pass test: the account appears in the account selector at the top.

  3. Create the property

    Click Create property, name it after the site, and choose your reporting time zone and currency. Pass test: the property shows in the Property column under your account.

  4. Set up the web data stream

    Choose Web as the platform, enter your site URL and a stream name, then click Create stream. Pass test: a stream details page opens with a Measurement ID starting with G-.

  5. Copy and store the Measurement ID

    Copy the ID (it starts with G-) and save it somewhere your team can find it, such as a password manager or project note. Pass test: the ID starts with G- and is pasted into a text file or note.

Analyst reviewing a live traffic report on a large monitor

04 / 12

Do I paste the Google tag directly or use Google Tag Manager?

Paste the Google tag directly if you have one site and no other tags; choose Google Tag Manager if you'll add tracking tags over time and prefer editing them in one place instead of in your site's code.

The Google tag is the snippet Google now recommends for sending data to Google products, including GA4. Pasting it into your site's pages is quick, but every future change becomes a code edit. Google Tag Manager is a free container tool that loads tags without touching your site's code each time.

Pick one branch and stay on it: running a direct tag and a GTM tag for the same Measurement ID can double-count page views and confuse your verification.

Going further

What changed, when

05 / 12

How do I install the tag or publish the container?

Installation means getting your snippet onto every page you want measured, then confirming it loads before you go looking for data in GA4.

With the direct path, paste the Google tag, the snippet Google now recommends for sending data to its products, into your site's shared header template so it loads on every page. Then hard-refresh to fetch the latest version. With Google Tag Manager, a free container that manages tags without editing site code each time, add the container snippet to every page, create a Google tag inside it using your Measurement ID (the code starting with G- that identifies your data stream), set it to fire on all pages, and publish. An unpublished container sends nothing.

If you can't edit code, ask your host to place the snippet in the global header. This takes minutes when your platform has a header field, longer if a developer must deploy.

  1. Step 1: Choose your path

    Decide between the direct Google tag and Google Tag Manager. The direct tag is a single snippet added to your site's shared template. GTM is a free container that manages tags without editing site code each time.

  2. Step 2: Insert the snippet

    Direct tag: paste the Google tag into your site's shared header template so it loads on every page. GTM: add the container snippet to every page, then create a Google tag inside the container using your Measurement ID (the code starting with G-) and set it to fire on all pages.

  3. Step 3: Publish (GTM only)

    If using GTM, click Publish. An unpublished container never sends data to GA4.

  4. Step 4: Verify the tag loads

    Hard-refresh your site in a browser to fetch the latest version. Then check that the tag appears in the page source or use a browser extension to confirm it fires.

06 / 12

How do I know GA4 is actually recording data?

Open Realtime in GA4 and visit your own site in another tab, if your visit appears within a minute or two, your tag is firing; then use DebugView to inspect the events themselves.

Start with the Realtime report, which shows activity from roughly the last 30 minutes. Open it in one tab, then load your site in another. One active user and a page view within a minute or two means the tag fires. Nothing after several minutes means the tag is not reaching GA4, stop and troubleshoot before changing settings.

Then enable debug mode with an extension or a debug parameter on your URL and open DebugView, which streams each event with its parameters. Run both tests twice: once as a normal visitor, once in incognito. If data appears normally but not incognito, a consent banner is likely blocking the tag before consent.

Realtime: pass/fail

Load your site in a second tab with Realtime open. Pass: at least one active user and a page view appear within a minute or two. Fail: nothing after several minutes, troubleshoot without changing your tag setup yet.

DebugView: pass/fail

Enable debug mode with an extension or debug parameter on your URL, then open DebugView. Pass: each event streams in with its parameters, including page_view. Fail: events never arrive, the tag is not firing or is misconfigured.

Incognito: pass/fail

Repeat the Realtime test in an incognito window. Pass: the page view appears, so the tag fires for fresh visitors. Fail here but pass in a normal window: a consent banner is likely blocking the tag until consent is given.

Going further

Realtime vs DebugView

07 / 12

No data is showing up, what went wrong?

Most "no data in GA4" cases come down to four causes: the tag never fired, the GTM container was never published, consent is blocking the tag, or the Measurement ID doesn't match the data stream you're watching.

Work the four causes in order: a tag that never fired, a GTM container still unpublished, consent blocking the hit, or a Measurement ID that doesn't match the data stream you're viewing. Start with the ID, an old Universal Analytics code, a second property's code, or a single wrong character sends everything to a stream you aren't looking at.

Then check consent: Consent Mode is a setting that adjusts how your Google tags behave based on each visitor's consent choices. Test in incognito before and after accepting cookies to see the difference.

No data in GA4: symptom, likely cause, fix

SymptomLikely causeFix
Realtime is empty on every pageTag never firedConfirm the snippet or container is present in the page source
Realtime is empty since a recent editGTM container in preview mode or unpublishedPublish the container, then re-check Realtime
Realtime shows you but not visitorsConsent Mode blocking tagsCompare incognito before and after accepting cookies
Realtime works, reports stay emptyMeasurement ID points to another data streamMatch the G- code in your snippet to the stream's ID character by character

Symptom-first triage: work top to bottom and stop when Realtime fills.

08 / 12

Can I trust the numbers GA4 shows me?

Not always at face value: GA4 can sample data in reports, hide rows when thresholding kicks in, model conversions when consent is missing, and report fewer users when consent is declined, none of which is a bug.

Two reports can disagree on the same metric without either being wrong. Sampling runs your query on a subset of sessions when the date range or dimension list is large. Thresholding hides rows when the data could identify a person, which is why a breakdown sometimes comes back mostly empty. Consent Mode, the setting that adjusts how your Google tags behave based on each visitor's consent choices, can subtract users who declined or let Google model what it never observed. Read the note at the top of a report before drawing conclusions.

When a number surprises you, check retention, consent, and thresholds before your tag. Those three explain most numbers that look broken. Modeled figures are estimates, not observations, so treat them as directional and label them that way in anything you share.

09 / 12

How do I mark an event as a key event?

Find the event in the admin events list, toggle "mark as key event," and it will appear as a conversion-style metric in your reports, do this immediately after verification, before touring any reports.

Mark only the events that signal money or a real lead: a purchase, a form submission, a demo booking. Every extra key event dilutes the signal, a click on a footer link is noise, not a conversion.

Once marked, the event appears in your reports' key-events column and becomes usable in explorations. If you can't find an event to mark, it hasn't been collected yet, go back and verify it.

Find the event

Open the admin events list; the event must already appear from real traffic.

Mark it as a key event

Toggle 'mark as key event' on the specific row, no code change needed.

Confirm it appears

Check the key-events column in reports and the event in explorations.

Don't over-mark

Limit to purchase, form submission, demo booking, not every click.

10 / 12

Which admin settings should I set on day one?

At launch, set data retention, define internal traffic, and add the domains whose referrals you want to ignore, three small settings that save you from months of messy data.

Start with the three settings that keep your reports clean: data retention, internal traffic, and unwanted referrals. Data retention controls how far back you can explore user-level and event data; the options you can pick depend on your account tier, so check Google's current documentation for the exact choices. Internal traffic filtering uses your office or home IP so your own visits don't inflate the numbers.

Unwanted referrals are the third fix: payment processors and redirect domains often appear as traffic sources and steal credit from the real ones. None of these settings is urgent in minute one, but they're cheap now and painful to unwind after a month of contaminated data.

Going further

Which retention period?

11 / 12

Frequently asked questions

Frequently asked questions

12 / 12

Sources, data and disclaimer

The Web Insider editorial team
About the author The Web Insider editorial team

Web Insider is a practical magazine for people who build, run or grow a website. Every fact is checked against its official source, and every test shows its proof.

Your feedback

Was this page helpful?

Share

Could this page help someone?

Related reading

Read next

Analyst comparing a dashboard on a laptop with a checklist on a tablet
Data & Analytics

GA4 Migration Checklist: Move Without Losing Data

Migrating from Universal Analytics to GA4 is not a switch you flip, it is a project. This checklist walks you through audit, parallel tracking, validation, and Consent Mode so your data stays clean.

·15 min
Abstract tag management interface on a laptop, with no logo visible
Data & Analytics

Google Tag Manager Logo: What the Icon Means

The GTM logo is the interlocking double-diamond mark for Google's tag management product. It proves Tag Manager is attached, not that your tags work. Here's how to read it.

·13 min
Laptop showing a tag debugging panel on a desk with a coffee mug
Data & Analytics

Best GTM Chrome Extensions for Testing Tags

Tag Assistant Legacy is gone, and the current crop of GTM Chrome extensions splits into three jobs: debugging tags, inspecting the dataLayer, and validating pixels. This guide maps each extension to the task you're actually doing.

·17 min
Explore the topicData & Analytics

Audience measurement, Google Analytics 4 and Google Tag Manager: set them up, check them and keep your data reliable.

Explore the topicWebsites & Platforms

WordPress, Shopify, PrestaShop and WooCommerce: run, integrate and maintain a site without making it fragile.

Explore the topicGuides & How-Tos

Methods, training and practical benchmarks to scope a web project, test a site and make better decisions.

Explore the topicSecurity & Compliance

Backups, updates, GDPR, cookies and audience measurement: keep a site safe and compliant.