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.
-
01 Create the property Make the account, property, and web data stream, and copy your Measurement ID.
-
02 Pick your path Choose the direct Google tag or Google Tag Manager, and follow only that branch.
-
03 Install and publish Place the tag on every page, or build and publish a GTM container.
-
04 Verify real traffic Confirm your own visit shows up in Realtime, then in DebugView.
-
05 Mark key events Flag the interactions that matter so they count in your reports.
-
06 Lock the admin basics Set data retention, internal traffic, and unwanted referrals.
-
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.
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.
-
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.
-
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.
-
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.
-
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-.
-
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.
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.
Direct Google tag
- You add one snippet to your site's pages, and Google reads your Measurement ID from it.
- No extra tool or account to learn.
- Every future tracking change means editing your site's code.
- Testing a new tag means pushing code first.
Best for a single site with no other tracking tags and no developer on call.
Google Tag Manager
- You place one container snippet on the site, then add and edit tags from inside GTM.
- You can publish changes without shipping code.
- One more moving part: an unpublished container is a common reason nothing shows up.
- You must add a Google tag inside GTM and configure your Measurement ID.
Best if you will add tracking tags over time and want them managed in one place.
Going further
What changed, when
Rule to know
The tag that replaced the config tag
In September 2023 Google introduced the Google tag, which replaced the older GA4 Configuration tag and is set up with your Measurement ID.
If your setup still uses the older GA4 Configuration tag, you are on the previous model. The Google tag is the current one Google points to when you copy installation instructions from GA4, and it carries your Measurement ID the same way. Confirm the exact date and wording on Google's official documentation before you change a working setup, and keep a note of what you replaced.
- Confirm the September 2023 changeCheck Google's official documentation for the Google tag and its replacement of the GA4 Configuration tag.
- Identify older configurationsLook for a GA4 Configuration tag in GTM or a gtag config call in your site's code.
- Plan the swapReplace the old configuration with the Google tag for the same Measurement ID, then republish.
- Re-verify collectionAfter the switch, test again so you are certain the same stream is still receiving data.
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.
-
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.
-
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.
-
Step 3: Publish (GTM only)
If using GTM, click Publish. An unpublished container never sends data to GA4.
-
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
Method
Why DebugView shows more than Realtime
Realtime confirms the tag fires; DebugView shows exactly which events and parameters arrive, making it the better tool during setup.
Realtime is a summary: a small number of active users and the events they triggered, refreshed continuously for roughly the last 30 minutes. It answers one question only, is data reaching GA4 right now? It will not tell you which parameters were sent, whether an event name is misspelled, or whether a custom dimension is populated.
DebugView streams every event as it arrives, with its full parameter set, for the browser or device where debug mode is enabled. That detail is what you need during setup: you can confirm page_view fires, then watch a button click arrive with its custom parameters, and spot a missing or mistyped value immediately.
Use Realtime for the quick first check, then switch to DebugView while you test each interaction. The extra click costs seconds and saves a cycle of guessing why a number looks wrong later.
- Use Realtime whenYou only need to confirm that the property is receiving traffic from your site.
- Use DebugView whenYou need to inspect event names, parameters, or custom dimensions as they arrive.
- DebugView requirementDebug mode must be enabled on the browser or device, via an extension or a debug parameter on your URL, or events will not stream there.
- Scope limitDebugView shows only debug-enabled sessions, so a quiet DebugView with active Realtime traffic does not mean data is broken.
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
| Symptom | Likely cause | Fix |
|---|---|---|
| Realtime is empty on every page | Tag never fired | Confirm the snippet or container is present in the page source |
| Realtime is empty since a recent edit | GTM container in preview mode or unpublished | Publish the container, then re-check Realtime |
| Realtime shows you but not visitors | Consent Mode blocking tags | Compare incognito before and after accepting cookies |
| Realtime works, reports stay empty | Measurement ID points to another data stream | Match 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.
Sessions, page views, and events from consented, unsampled traffic
- Derived from raw, individual hits
- Stable across standard date ranges
- Safe to trend week over week
- Excludes users who declined consent
- Still inflates when one person uses several devices
Trust these for direction and comparisons; do not treat them as an exact census.
Detailed or long-range report breakdowns
- Useful for spotting patterns in big datasets
- Sampling extrapolates from a subset
- Thresholding may hide whole rows
- Two views of the same metric can differ
Read the report note first and caveat the figure whenever sampling or thresholding appears.
Conversions and audiences under Consent Mode modeling
- Recovers estimated credit for users who declined
- Keeps campaigns from looking worse than they are
- The modeled portion is an estimate, not an observation
- Behavior-based audiences can be underestimated
Present as estimated; never report a modeled figure as observed revenue.
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.
Data retention
This setting decides how long user-level and event data stays available for exploration. The default is not the same as the maximum you can select, and the choices you can pick depend on your account tier. Confirm the exact options in Google's current documentation before you rely on a number.
- What you control
- Exploration window for user and event data
Key pointOpen Admin > Data Settings > Data Retention, pick the longest option your property allows, and save.
Internal traffic
Your own team's visits can inflate sessions, conversions, and engagement if left in. Define your office, VPN, or home IP addresses as internal traffic so they are excluded from reports. If you don't know your IP, search 'what is my IP' from the network you use at work.
- What you need
- The public IP addresses your team browses from
Key pointGo to Admin > Data Streams > Configure Tag Settings > Define Internal Traffic, add the IPs, and save.
Unwanted referrals
Payment gateways, scheduling tools, and other redirect domains often show up as referral traffic and take credit from the source that actually brought the visitor. Add those domains to the unwanted referrals list so GA4 ignores them. Common examples include PayPal, Stripe, and booking tools.
- What you need
- The domains your visitors pass through during checkout or signup
Key pointGo to Admin > Data Streams > Configure Tag Settings > List Unwanted Referrals, add the domains, and save.
Going further
Which retention period?
Special case
Retention without guessing
Default retention differs from selectable retention, and the exact options must be confirmed against current Google documentation rather than assumed.
When you open the data retention setting, you'll see a default option already selected. That default is not the same as the longest period you can choose. Google has changed both the default and the selectable maximum over time, and the options can also vary by account tier.
The only reliable way to get this right is to check Google's official Analytics Help page for data retention at the time you configure it. Don't copy a number from a blog post or a video from last year. The setting itself takes seconds; verifying the current options takes one page load.
- Default vs selectableNote the option already selected when you arrive, that's the default. The dropdown may offer longer periods.
- Account tier dependencyThe maximum retention option can depend on your account tier. Check the current documentation for your tier.
- Date your choiceWrite down the date you selected a retention period, so you know when to revisit it if Google updates the options.
- Confirm on Google's pageBefore quoting a retention period to anyone, open Google's official Analytics Help page for data retention and confirm the current options.
11 / 12
Frequently asked questions
12 / 12










