Setting up Google Analytics 4: the complete guide
Google Analytics 4 is easy to start and hard to get right. The property takes two minutes; the settings that decide whether your reports are trustworthy are spread over a dozen admin screens, and most of them are off by default. This guide walks through all of them in the order you should do them, says what you should see after each step, and ends with a checklist you can tick off. Each step links to a longer article when you want the detail.
It is written for the person who owns a website or a shop and has to make the numbers right, not for developers. You need admin access to the Google account that will own the property, access to your website or to Google Tag Manager, and about an hour. Checked against the GA4 interface on 17 October 2026; Google renames things, so where a menu label differs, look for the nearest match.
Step 1 · Decide what goes in one property
A property is the container for your reports. The rule of thumb: one property per business, with one data stream per platform (website, iOS app, Android app). Put a shop and its blog in the same property when they share visitors and one checkout; give a second brand with its own domain and its own customers a property of its own. Splitting too fine is the most common regret, because GA4 cannot merge properties afterwards and cross-property reporting needs BigQuery.
Also decide now who owns it. Create the property under a Google account that belongs to the company, never under an agency's or a freelancer's personal login. You can add as many users as you like later; moving a property between accounts is possible but awkward.
You should end this step with: a list of domains and apps per property, and the Google account that will create it.
Step 2 · Create the property and the web data stream
Go to Admin › Create › Property. Give it the business name, pick the reporting time zone and currency you want every report in, and answer the business questions (they only change which default reports you see). On the next screen choose Web as the platform, enter the website URL and a stream name, and leave enhanced measurement on for now; step 4 tunes it.
GA4 then shows the Measurement ID, the code that starts with G-. Copy it somewhere; the next step needs it, and so does your server container if you run one.
You should see: the stream details page with the Measurement ID, stream URL and stream ID. Nothing arrives yet; that is normal until the tag is installed.
Longer version with the account structure, roles and a few traps: Setting up and configuring a GA4 property.
Step 3 · Install the tag, once
There are three ways to put GA4 on a site, and the mistake to avoid is using two of them at the same time, which doubles every page view.
- Google Tag Manager (recommended): one Google tag with the Measurement ID, firing on the Initialization trigger. Everything else in this guide, from key events to e-commerce, is easier with Tag Manager in place.
- The gtag.js snippet straight in the page template: fine for a brochure site that will never track more than page views.
- A platform plugin (Shopify, WooCommerce, Shopware): quick, but check that it does not also inject a second Google tag next to Tag Manager.
After installing, open the site in a new tab, then check Admin › DebugView or the Realtime report. One page_view per page is right; two means a double install.
Step-by-step for the Tag Manager route, including the trigger, the Tag Assistant check and the double-install test: Installing GA4 with Google Tag Manager.
Step 4 · Enhanced measurement: keep what you can trust
Open the data stream and click the gear next to Enhanced measurement. GA4 can collect scrolls, outbound clicks, site search, video engagement, file downloads and form interactions without extra tagging. Keep page views, outbound clicks, site search and file downloads on. Turn form interactions off unless you have checked what it counts: it fires on any form, including search boxes and newsletter widgets, and the numbers rarely mean "a lead". Leave scroll on only if the 90 percent threshold tells you something; a one-screen landing page scrolls to 90 percent instantly.
If your site has an internal search, open Show advanced settings under site search and add your query parameter (often q, s or search) when it is not one of the defaults.
You should see: after a test visit, page_view, scroll, click and view_search_results events appearing in DebugView with the expected parameters.
What each toggle actually does and when it misleads: Enhanced measurement in GA4, toggle by toggle.
Step 5 · Data retention, Google Signals and thresholding
Three settings decide how much history you keep and how much of it you are allowed to see.
- Admin › Data collection and modification › Data retention: the default is 2 months of event data for Explorations. Set it to 14 months, the maximum on a standard property. Standard reports are not affected, but every custom exploration is.
- Google Signals (under Data collection): turns on cross-device reporting and demographics for signed-in Google users. It also enables thresholding, which hides rows from reports when the audience is small enough to identify people. On a site with a few hundred visitors a day that can remove whole rows from your landing-page report. Most small and medium sites are better off with Signals off, or on with the reporting identity set to Device-based.
- Reporting identity: under Admin › Data display. "Blended" uses Signals and modelling where available; "Observed" uses only what you measured; "Device-based" uses the cookie alone. Pick Observed when you want the numbers to match what you can explain.
You should see: data retention showing 14 months, and the thresholding warning icon gone from your reports if you turned Signals off.
Step 6 · Keep your own visits out
Your team, your agency and your QA environment generate sessions that look like customers. GA4 handles this in two places that have to be used together. First define the traffic: Data streams › your stream › Configure tag settings › Show all › Define internal traffic, add a rule with your office IP addresses or ranges. Second activate the filter: Admin › Data collection and modification › Data filters, where the "Internal traffic" filter starts in Testing mode. Testing mode only labels the traffic; switch it to Active after you have confirmed in DebugView that your own visits carry traffic_type: internal.
Two limits worth knowing: home and mobile IPs change, so the list goes stale, and the filter is applied when data arrives, never retroactively. If you run your tracking through a server container, the IP Filter power-up drops those requests before they reach GA4 and keeps one list for every platform.
You should see: your own test visit missing from Realtime once the filter is active.
Step 7 · Referrals and domains: payment providers, subdomains, a second domain
Three settings live under Configure tag settings in the data stream, and each one fixes a specific report problem.
- List unwanted referrals. Add the domains of your payment providers (Mollie, Adyen, Stripe, PayPal, iDEAL banks). Without this, a purchase that returns from the payment page starts a new session attributed to "mollie.com / referral", and the real campaign loses the sale.
- Subdomains need no configuration: the GA4 cookie is set on the root domain, so
shop.example.comandwww.example.comshare a session as long as both load the same Measurement ID. - Configure your domains is for a different root domain, for example a checkout on another domain. Add both domains and GA4 passes the client ID through the link. Details and the test: Cross-domain tracking between two root domains.
You should see: after a test purchase, one session that starts on your campaign source and ends with the purchase, with no "referral" session from the payment provider in between.
Step 8 · Key events: the conversions you will steer on
GA4 calls conversions key events. Any event can be one; the switch lives under Admin › Data display › Events, in the "Mark as key event" column, or under Key events › New key event when the event has not arrived yet. Pick few: a purchase, a lead form, a sign-up, maybe a phone click. A site with twelve key events has none.
For each one, open its settings and choose the counting method: "once per event" for purchases, "once per session" for leads and sign-ups, so a visitor who submits twice counts once. Key events are also what Google Ads imports, so the names you choose here are the names you will see in bidding.
You should see: the event appearing in the Key events report within a day of the first real one, and in Realtime straight away after a test.
Choosing, naming and counting them, plus the "create event from another event" trick: Key events in GA4.
Step 9 · E-commerce: the purchase event and its items
Revenue in GA4 comes from one event, purchase, with a transaction_id, value, currency and an items array that carries each product's item_id, item_name, price and quantity. Everything in the Monetization reports is built from that structure, and it has to arrive exactly like that: a purchase without items shows revenue but no products, and a transaction_id that repeats deduplicates to nothing.
The funnel events (view_item, add_to_cart, begin_checkout, add_shipping_info, add_payment_info) are optional but cheap once the data layer exists. Shop platforms differ in what they push by default; the plugins for Shopify, WooCommerce and Shopware push the complete set.
You should see: a test order in DebugView as one purchase event whose items expand to the products bought, and the order in the Monetization overview the next day with the right revenue.
The data layer, the Tag Manager tags, the test order and the five mistakes that break revenue: E-commerce tracking in GA4 with Tag Manager.
Step 10 · Consent Mode v2
In the EU, GA4 has to respect the choice a visitor makes in your cookie banner. Consent Mode is how the Google tags learn that choice: with consent denied, GA4 either sends nothing (basic mode) or sends cookieless pings that Google turns into modelled conversions and sessions (advanced mode). Since March 2024 the two extra signals, ad_user_data and ad_personalization, are required for anything that feeds Google Ads.
The setup has two halves: your consent platform sets the default to denied before any tag fires and updates it after the choice, and your tags are configured to honour it. Check it in Tag Assistant: the consent state should show denied on the first load and granted after accepting, with no GA4 cookie set in between.
You should see: in GA4, Admin › Data collection shows "Consent settings" with both signals active once pings arrive; in reports, a share of sessions marked as modelled after a week.
The full configuration, with and without a server container: Consent Mode v2 with server-side Google Tag Manager.
Step 11 · Link Google Ads and Search Console
Under Admin › Product links, link the Google Ads account (so Ads can import your key events and build audiences) and the Search Console property (so the organic landing-page queries show up under Acquisition). Linking Ads also turns on auto-tagging, which replaces UTM tagging for Google campaigns with the gclid parameter.
After linking Ads, go to Google Ads › Goals › Conversions and import the key events from step 8. Set the attribution and counting there to match GA4, or the two tools will report different conversion numbers for the same day.
You should see: a "Google Ads" row in the Acquisition reports with campaign names, and your key events listed as conversion actions in Ads.
Step 12 · Reports to set up on day one
Three small changes make the default reports usable.
- In the Landing page report (Engagement), add "Key events" and "Session key event rate" as columns, and save it to the library so the team finds it.
- Under Admin › Data display › Channel groups, check how your traffic is classified. If you tag newsletters with
utm_medium=emailand paid social withutm_medium=paid_social, the defaults work; anything custom ends up in Unassigned. - Create one Exploration (a free-form table with landing page × source/medium × key events) and leave it in the shared folder. It answers 80 percent of the questions people ask.
Step 13 · Going server-side: what changes and what you gain
Everything above is the same whether your GA4 tag sends data straight to Google or through a server container. What a server container changes is the path the data takes, and three things come with that.
- First-party cookies. With tracking served from your own subdomain, Safari and Firefox treat the GA4 cookie as first-party and keep it longer than the 7 days that ITP otherwise allows. Returning visitors stay returning visitors.
- Fewer blocked hits. Ad blockers filter the Google domains, not yours. Measurebase's Enhanced Ad Blocker Protection recovers the hits that would otherwise be lost, typically 10 to 30 percent of GA4 sessions on a Dutch site.
- EU hosting and control. The hit lands on a server you choose, in Europe, where you can mask IP addresses, add data or drop fields before anything reaches Google.
The things that do not change: the property, the events, the key events and the reports. If step 1 to 12 are right, going server-side is a routing change, not a rebuild. How the event path works on both sides: GA4 server-side: the basics, and the hands-on walkthrough is the Measurebase setup guide.
Step 14 · The checklist
Print this, tick it off, keep it with the property.
- Property under the company's Google account; time zone and currency set
- One web data stream; Measurement ID copied
- Tag installed once; one page_view per page in DebugView
- Enhanced measurement reviewed; form interactions off unless verified
- Site search parameter added if the site has search
- Data retention set to 14 months
- Google Signals decided; reporting identity set on purpose
- Internal traffic defined and the filter set to Active
- Payment providers listed as unwanted referrals
- Cross-domain configured if a second root domain is involved
- Key events marked, with counting methods set
- Purchase event verified with items and a unique transaction_id
- Consent Mode v2 defaults denied, updated after the choice
- Google Ads and Search Console linked; key events imported into Ads
- Landing page report saved with key events; channel groups checked
- One shared exploration
- Server-side routing decided; if yes, the setup guide followed
Two habits keep it right afterwards: look at DebugView after every release that touches the site's forms or checkout, and run a tracking audit monthly. Measurebase's audit checks most of this list every night and tells you when something drifts.
Frequently asked questions
Do I need Google Tag Manager to use GA4?
No, but you will want it as soon as you track anything beyond page views. Every step in this guide that involves events, e-commerce or consent is a few clicks in Tag Manager and a developer ticket without it.
How long before data shows up in the reports?
Realtime and DebugView show events within seconds. The standard reports fill within 24 to 48 hours, and attribution data for a day is not final until about four days later, which is why fresh traffic often shows as Unassigned at first.
Can I change the time zone or currency later?
Yes, but the change applies only to data from that moment on, so reports that span the change date will have a jump. Set both correctly in step 2.
What is the difference between a key event and a conversion?
Nothing in substance. Google renamed conversions to key events in GA4 in 2024 so that "conversion" means the same thing in Google Ads as in Analytics. Key events are what Ads imports as conversions.
Should I turn Google Signals on?
Only if you need demographics or cross-device reports and your traffic is large enough that thresholding rarely triggers. For most small and medium sites, the rows it hides cost more than the extra dimensions are worth.
Does server-side tagging replace any of these steps?
No. It changes where the GA4 hit goes on its way to Google. The property settings, the events and the key events stay exactly the same, which is why this guide applies whether or not you use Measurebase.
Why does GA4 show (not set) or Unassigned for some traffic?
Usually one of five causes: custom UTM values the channel groups do not recognise, two tracking paths for one visitor, server-to-server events without a session, a missing referrer, or consent. The Unassigned guide walks through each.
How do I check the setup is still right in six months?
Repeat the checklist in step 14 after any site change, and keep DebugView open during a test order. If you run tracking through Measurebase, the nightly audit checks the Google tag, the server URL, consent and the e-commerce events for you and opens an alert when something changes.