GA4 setup takes about ten minutes to get data flowing and much longer to get data you can trust. Installing the tag is the easy part. The settings most installs skip, such as data retention, internal traffic, the events that matter to your business and consent, decide whether your reports show reality or a rough guess.
This GA4 setup guide covers how to set up GA4 from scratch, step by step, following Google’s own setup instructions, then the configuration most guides leave out, and the checks to run before you rely on the numbers. It includes the event plan we use on our own site as a worked example.
The short version
- Create the account, property and web data stream, then install the Google tag on every page, once.
- Change data retention to 14 months on day one. It can’t be applied to data already collected.
- Exclude internal traffic, so your own visits don’t inflate the numbers.
- Plan your events before you build them: use the automatic ones, add the few actions that matter to your business, and use Google’s recommended names where they fit.
- Mark the actions that matter as key events (formerly conversions).
- Link Search Console, and Google Ads if you advertise.
- Respect consent where the law requires it, and never send personal information to Analytics.
- Test before you trust it, with Realtime, DebugView and a comparison against your own records.
Before you start your Google Analytics 4 setup
You’ll need a Google account, access to your website (or its platform’s settings, or Google Tag Manager), and a short list of what counts as success for your business: an enquiry, a booking, a sign-up, a purchase. That list decides the events you’ll set up in Step 7, so write it down now.
If you have visitors in the UK or EU, decide how you’ll handle cookie consent before you install the tag. Step 10 covers it.
Step 1: Create the account and property
- Go to Google Analytics and start measuring, or open Admin and create a new account if you already have one.
- Name the account (usually your business) and choose the data-sharing settings you’re comfortable with.
- Create a property for your website. Choose the reporting time zone and currency your business uses: the time zone decides which day a visit is recorded on.
- Enter your industry and business size, and choose how you plan to use Analytics. Google uses this to pick your default reports, and you can change the reports later.
Step 2: Add a web data stream
Choose Web, enter your site’s main URL and a stream name. Leave enhanced measurement switched on: it collects page views and several common interactions automatically (covered in Step 6). When the stream is created, copy its Measurement ID, which starts with G-.
Step 3: Install the Google tag
Pick the method that fits your site:
| Your site | How to install |
|---|---|
| A platform with a built-in Google Analytics field (Shopify, Wix, many WordPress plugins) | Paste the Measurement ID into that field |
| A builder without one | Add the full Google tag snippet through its custom code or HTML setting |
| A hand-coded site | Paste the Google tag into the head of every page |
| Google Tag Manager | Add a Google tag with your Measurement ID, set to fire on all pages |
Install it once. The most common GA4 mistake is a duplicate tag, for example a plugin and a theme both adding it, which double-counts every page view. Google says data collection can take up to 30 minutes to begin; check the Realtime report to see your own visit arrive.
Step 4: Set data retention to 14 months
In Admin, under Data collection and modification, open Data retention and change event data retention from 2 months to 14 months. This setting controls how far back explorations and funnel reports can look, according to Google’s data retention help. Standard reports aren’t affected, but with 2 months you can’t compare this year’s explorations with last year’s. The change only applies from the moment you make it, which is why it belongs on day one.
Step 5: Exclude internal traffic
Your own visits, and your team’s, distort small sites badly. Google’s process for excluding internal traffic has three parts:
- Define internal traffic in your web stream’s tag settings, using your office or home IP address.
- Create a data filter for internal traffic, set to exclude.
- Test, then activate. Leave the filter in Testing mode first and check that it catches only your traffic. Activating it permanently removes matching data, and filters can take 24 to 36 hours to take effect.
If your team works from changing IP addresses, also ask them to use a browser profile with an analytics opt-out, and accept that some internal visits will get through.
Step 6: Check what enhanced measurement collects
Enhanced measurement records these events without any code:
| Event | What it records |
|---|---|
page_view |
Every page load, including changes in single-page apps |
scroll |
The first time a visitor reaches 90% of a page’s depth |
click |
Clicks on links to other websites |
view_search_results |
Searches on your site, read from the URL’s search parameter |
video_start, video_progress, video_complete |
Engagement with embedded YouTube videos |
file_download |
Clicks on links to common file types, such as PDFs |
form_start, form_submit |
Form interactions |
Two checks are worth making. If your site search uses a parameter other than the usual ones (q, s, search, query, keyword), add it in the stream settings. And treat the automatic form events with care: a “submit” isn’t always a successful submission, so for leads, track the confirmation instead (Step 7).
Step 7: GA4 events setup for the actions that matter
Enhanced measurement covers browsing. Your business needs events for the actions that make money. Plan them before you build them:
- Use Google’s recommended event names where they fit, such as
generate_lead,sign_up,purchaseorbegin_checkout. Some reports and integrations understand them automatically. - Add parameters for the details you’ll want to compare, such as which form, which product category or which plan.
- Register parameters as custom dimensions in Admin, or they won’t appear in your reports.
- Fire events on success, not on attempts. A lead event should fire when the form was actually sent, not when the button was clicked.
- Keep the list short. A handful of well-defined events beats dozens nobody looks at.
Here’s the plan we use on our own site, as a worked example:
| Event | When it fires | Parameter |
|---|---|---|
generate_lead |
On the thank-you page, only after a real, successfully sent contact or audit form | lead_source: which form it came from |
tool_run |
Once per page view, when a free tool first works on the visitor’s own input | tool_name |
tool_export |
Each time a visitor copies or downloads a tool’s result | tool_name |
tool_use |
Other tool interactions, such as loading an example | tool_name, tool_action |
Two rules sit behind it. The lead event only fires when our form handler confirms the message was sent, so spam submissions and failed sends never count. And no event ever carries anything a visitor typed or pasted, which keeps personal data out of Analytics entirely.
Step 8: Mark your key events
Key events are the events you mark as most important; GA4 called them conversions until 2024. In Admin, open Events, find the event and click the star to mark it as a key event, following Google’s guide to key events. Standard properties can have up to 30. Mark only real business outcomes, such as leads, sign-ups and purchases, not scrolls or clicks.
Step 9: Link Search Console and Google Ads
In Admin, under Product links, link your Search Console property to see the searches that bring people to each landing page alongside what they did next. If you advertise, link Google Ads too, so you can import your key events as ad conversions and see paid and organic results side by side.
Step 10: Consent and privacy
- Consent. Google Analytics sets cookies, so in the UK and EU you generally need visitors’ consent before it sets them. Google’s consent mode lets the tag respect each visitor’s choice, and its region setting applies a different default by country. On our own site, analytics cookies stay off in the UK, the EU and Switzerland until a visitor accepts, and anyone can change their choice from the footer. Check the rules for every country you have visitors from.
- No personal information. Google’s policies forbid sending Analytics anything that could identify a person, such as names, email addresses or phone numbers, including inside page URLs or event parameters. Check form confirmation URLs in particular.
- Your privacy policy should say that you use Google Analytics, what it collects and how visitors can opt out. Google states that Google Analytics 4 doesn’t log or store IP addresses.
Step 11: Check it before you trust it
- Realtime: visit your site and watch your page views and events arrive.
- DebugView: with debug mode on (through Tag Assistant or Tag Manager’s preview mode), walk through each important action, such as submitting a form, and confirm the right event fires once, with the right parameters.
- Compare with your own records: after a week, check GA4’s lead or purchase count against your inbox, CRM or store orders. A small gap is normal; a large one means something is broken.
- Look for duplicates: if every page shows two page views per visit, you have two tags.
Standard reports can take a day or two to fill in, so judge the setup on a week of data, not the first afternoon.
A GA4 setup checklist

Common GA4 setup mistakes
- Two tags on the same page, double-counting everything.
- Leaving data retention at 2 months.
- Counting your own visits because internal traffic was never excluded.
- Treating every form submit as a lead, including spam and failed sends.
- Too many key events, so the important ones get lost.
- Personal data in URLs or events, which breaks Google’s policies.
- No consent handling for visitors in the UK and EU.
- Never checking the numbers against what actually happened in the business.
Where GA4 fits
GA4 is the measurement layer under everything else: it tells you which channels and pages bring leads and sales, which is what a useful marketing report is built on. If you’d rather have the setup done and checked for you, our analytics and conversion rate optimization services include GA4 setup, event planning and reporting.
