New ChatGPT vs Google Search Volume: What OpenAI’s 20% Claim Really Means

Analytics & Data

GA4 Setup Guide: Track Your Website the Right Way

How I set up Google Analytics 4 on a website, from the first account to the settings and checks that keep your data clean from day one.

GA4 Setup Guide: Track Your Website the Right Way

Quick Answer

To set up GA4, create a Google Analytics account, add a property with the right time zone and currency, and add a web data stream. Then install the Google tag (your G- Measurement ID) through your CMS, the page code or Google Tag Manager. Check data in Realtime and DebugView, then set data retention to 14 months and filter internal traffic.

Key Takeaways

  • Most sites need one account, one property and one web data stream.
  • Install the Google tag one way only. A duplicate tag doubles your page views.
  • Change data retention from the default 2 months to 14 months straight after setup.
  • Keep the internal traffic filter in Testing first, because an active filter removes data for good.
  • After linking Search Console, publish its collection in the Library or the reports stay hidden.
  • Mark only a few real business outcomes, such as leads or sales, as key events.
In this article
  1. Before You Start: What You Need
  2. GA4 Setup Step by Step
  3. GA4 Settings to Change on Day One
  4. Link Search Console and Google Ads
  5. Set Up Key Events for the Actions That Matter
  6. Consent and Privacy
  7. Common GA4 Setup Mistakes
  8. What to Check in the First Week
  9. Final Thoughts
  10. Frequently asked questions

If you have just built a website, or you inherited one with messy tracking, you need a clean GA4 setup before you can trust any number in your reports. The short version: create a Google Analytics account, add a property, add a web data stream, install the Google tag on every page, and then check that data is arriving. That takes about 30 minutes.

The part most guides skip is what comes after. A few settings left on their defaults can quietly spoil your data for months. In this guide I walk through the full GA4 setup, the settings I change on day one, and the checks I run before I trust the reports.

Before You Start: What You Need

You need three things before you open Google Analytics:

  • A Google account that the business owns. I recommend a company account, not a personal Gmail of the person who happens to be setting it up.
  • Access to your website, either the CMS admin (WordPress, Shopify, Wix and so on) or the code, or a Google Tag Manager container.
  • A short list of what matters to the business, such as sales, enquiry forms, calls or bookings. You will turn these into key events later.

The ownership point matters. If an agency creates the account under its own login, the business can lose access later. I always create it under the business and give others access through user management.

How GA4 Is Organised

GA4 has three levels, and knowing them makes every later step easier:

  • Account: the top level, usually one per business.
  • Property: where your data and reports live. One property per website (or per website and app that belong together) is the normal setup.
  • Data stream: the source of the data. A website is a web stream. An iOS or Android app gets its own app stream.

Most sites need one account, one property and one web data stream. In my experience, extra properties per subdomain or country just make the full picture harder to see.

GA4 Setup Step by Step

Here is the full process for a website. The menu names are the ones Google Analytics uses at the time of writing.

Step 1: Create a Google Analytics Account

  1. Go to analytics.google.com and click Start measuring. If you already have an account, go to Admin, click Create and choose Account.
  2. Enter an account name. The business name is fine.
  3. Review the data-sharing settings. These control what Google can use from your data, such as for benchmarking or technical support. Tick only what you are comfortable with.

Step 2: Create a Property

  1. Enter a property name. I use the domain name, such as “example.com”.
  2. Choose the reporting time zone. Pick the time zone where the business works, not where you are sitting.
  3. Choose the currency you sell in.

Take care with the time zone. It decides where each day starts and ends in your reports. If you change it later, GA4 only uses the new time zone going forward, so you can end up with a strange day in the data at the switch.

Step 3: Add Business Details and Objectives

GA4 asks for your industry category and business size. Then it asks how you plan to use Analytics, with options such as generating leads, driving online sales or understanding user behaviour.

Your choice here decides which reports GA4 shows you by default. It does not limit what GA4 collects. If you are not sure, pick the options closest to your real goal. You can change the reports later. Then click Create and accept the terms of service.

Step 4: Add a Web Data Stream

  1. Choose Web as the platform.
  2. Enter your website URL and a stream name, such as “Main website”.
  3. Leave enhanced measurement switched on.
  4. Click Create stream.

Enhanced measurement (a set of events GA4 tracks on its own, without extra code) is one of the best things about GA4. It covers these events out of the box:

Event What it tracks
page_view Each page load, plus page changes on sites that update the URL without a full reload
scroll The first time a visitor reaches 90% of the way down a page
click Clicks on links that go to another domain (outbound clicks)
view_search_results Use of your site search, read from URL parameters such as q or s
video_start, video_progress, video_complete Plays of embedded YouTube videos that allow tracking
file_download Clicks on links to common file types, such as PDFs or spreadsheets
form_start, form_submit When someone starts and submits a form

A word of warning on form events. They fire on many forms, including newsletter boxes and search bars, and they do not always tell you the form was sent successfully. I treat them as a rough signal, not as my lead count.

If your site search uses a different URL parameter, add it in the enhanced measurement settings, or GA4 will miss it.

Step 5: Install the Google Tag

After you create the stream, GA4 shows your Measurement ID. It starts with G-, for example G-ABC123XYZ. You use this ID to connect your website to the property. There are three common ways to do it.

Option A: your CMS or website builder. Many platforms, such as Wix and Squarespace, have a field where you paste the Measurement ID. Shopify connects through its Google & YouTube app. On WordPress, Google’s Site Kit plugin or a similar plugin can add the tag for you. This is the easiest route and fine for most small sites.

Option B: add the code yourself. In the stream details, go to View tag instructions and choose Install manually. Copy the code and paste it right after the opening <head> tag on every page. It looks like this:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ABC123XYZ"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-ABC123XYZ');
</script>

Copy your own code from GA4 rather than typing it. Adding it once to a shared header template loads it on every page.

Option C: Google Tag Manager. In your Tag Manager container, create a new tag, choose Google Tag as the tag type, paste your Measurement ID as the tag ID, and set it to fire on all pages. Then publish the container. If you plan to track clicks, forms and other custom events, I prefer this route because it keeps all tracking in one place.

Pick one method only. The most common GA4 setup mistake I see is the same tag added twice, for example by a plugin and by a hand-coded snippet. That counts every page view twice, so check with Tag Assistant.

Step 6: Check That Data Is Arriving

  1. Open your website in a normal browser window and click around a few pages.
  2. In GA4, open Reports and then Realtime. You should see at least one user and your page views. Google says it can take up to 30 minutes for data to start showing.
  3. For a closer look, use Tag Assistant (tagassistant.google.com) to connect to your site. It shows whether the Google tag fires and which events it sends.
  4. With Tag Assistant connected, open Admin and then DebugView. It lists each event from your test visit in order, with its details.

Standard reports take longer, often up to a day or two. Don’t panic if they look empty on the first afternoon.

GA4 Settings to Change on Day One

These settings are easy to miss, and most only apply from the moment you change them. So do them right after the install.

Set Data Retention to 14 Months

By default, a standard GA4 property keeps user-level data for only 2 months. Go to Admin, then Data collection and modification, then Data retention, and set it to 14 months.

This setting affects explorations (GA4’s custom analysis reports), not the standard reports. I use explorations to compare periods all the time, so I change it on every property I touch.

Filter Out Your Own Visits

Your team’s own visits can inflate traffic, especially on a small site. GA4 lets you mark visits from your office IP address as internal and exclude them.

  1. In Admin, open Data streams and click your web stream.
  2. Click Configure tag settings, then Show more, then Define internal traffic.
  3. Create a rule with your office IP address. Leave the traffic_type value as internal.
  4. Go to Admin, then Data collection and modification, then Data filters. GA4 creates an internal traffic filter in a Testing state.
  5. Check the result, then switch the filter to Active.

Be careful with the last step. Google’s guide to filtering out internal traffic makes clear that an active filter removes matching data for good. I leave the filter in Testing for a few days first, so I can check it is catching the right visits. If your team works from home with changing IP addresses, this method will not catch everyone, and that is fine. It still cleans up the bulk of it.

List Unwanted Referrals

If customers leave your site to pay through a payment provider and come back, GA4 can credit the sale to the payment site. In Configure tag settings, open List unwanted referrals and add the provider’s domain.

Set Up Cross-Domain Measurement If You Need It

If a visit moves between two of your own domains, such as your main site and a separate booking domain, open Configure your domains in Configure tag settings and add both. Without it, GA4 counts the move as a new visit from a referral. Subdomains of the same domain don’t need this.

Decide on Google Signals

Google signals adds data from signed-in Google users, such as demographics and cross-device reporting. It sits under Admin, then Data collection and modification, then Data collection. It can also make GA4 hide some rows in small reports to protect privacy (called thresholding). On a small site, I usually leave it off unless I need the demographic data.

A GA4 setup for SEO is not complete without Search Console. Linking the two lets you see Google search queries and organic landing pages next to engagement and key events in one place.

  1. In Admin, go to Product links, then Search Console links, and click Link.
  2. Choose your Search Console property. You need to be an owner of it, and an editor on the GA4 property.
  3. Pick your web data stream and confirm.

Here is the step people miss: the Search Console reports do not show up in the menu on their own. Go to Reports, open the Library at the bottom of the left menu, find the Search Console collection and click Publish. Then the Queries and Google organic search traffic reports appear under Reports.

If you run Google Ads, link it from the same Product links area so you can use GA4 key events in Ads.

Set Up Key Events for the Actions That Matter

Page views tell you people arrived. Key events tell you whether the site did its job. A key event is any event you mark as important, such as a purchase, an enquiry or a booking. Google renamed GA4 “conversions” to key events in March 2024, so older guides may still use the old word.

The simplest way to start is with a thank-you page:

  1. Go to Admin, then Data display, then Events, and click Create event.
  2. Name the new event, for example generate_lead.
  3. Add two matching conditions: event_name equals page_view, and page_location contains your thank-you page path, such as /thank-you.
  4. Save it. After the event shows up, click the star next to it in the same Events list to mark it as a key event.

Online shops that send purchase events through their platform will see purchase marked as a key event already. My rule of thumb is to keep the list short. If everything is a key event, nothing stands out.

When I map out which actions to track, I go back to the goals of the site itself. If you are still working those out, the SEO checklist for 2025 covers what to fix and measure first.

GA4 uses cookies, so in many countries you need a cookie banner and a privacy policy that mention Google Analytics. If you have visitors from the European Economic Area and you use Google Ads, Google requires consent mode (a way to pass your visitors’ cookie choices to Google tags) for ad personalisation and remarketing. Many cookie banner tools support consent mode with a simple setting.

Also keep personal information, such as email addresses in page URLs, out of GA4. Google’s rules don’t allow it. I check for this after every new form goes live.

Common GA4 Setup Mistakes

Beyond the settings above, these are the problems I see most often when I look at a new property:

  • The tag is missing from some pages. Landing pages built in a separate tool, blog subfolders and checkout pages often miss it.
  • A test or staging site sends data too. If a copy of the site carries the same tag, its visits mix with real ones. Remove the tag from staging, or use a separate property for it.
  • Search Console reports never published. The link is there, but nobody can find the reports.

If you set up a Google Business Profile for a local business, add UTM tags (small labels on the end of a URL that tell GA4 where a visit came from) to your website link there. Otherwise those visits blend into general organic search. My guide to Google Business Profile setup covers that profile side.

What to Check in the First Week

Once the GA4 setup is live, I give it a few days and then run through a short review:

  1. Traffic sources look sensible. Open Reports, then Acquisition, then Traffic acquisition. Organic search, direct and referral should all appear. A very high share of “Unassigned” traffic usually means a tagging problem.
  2. Every key page has views. In Engagement, then Pages and screens, check that your main pages, checkout and thank-you pages show up.
  3. Key events fire once per action. Test a form or purchase yourself and check the count in DebugView.
  4. Numbers roughly match reality. Compare GA4 orders or leads with your shop or CRM. They will never match exactly, because of ad blockers and cookie choices, but they should be close enough to follow the same trend.

I also keep a simple note of the date tracking went live and every setting I changed. It saves guesswork months later.

When the data is flowing, you can start using it to find pages that need work. I use the landing page report together with my on-page SEO checklist to decide which pages to improve first.

Final Thoughts

A good GA4 setup is less about the install and more about the settings around it. Create one account, one property and one web stream. Install the Google tag once, check it in Realtime and DebugView, then change data retention, filter internal traffic, fix referrals and link Search Console on day one. Google’s own GA4 setup instructions are worth keeping open while you work.

Your next step is to pick two or three key events that show real business results and test them this week.

Frequently Asked Questions

How long does it take for GA4 to show data after setup?

The Realtime report usually shows your visit within minutes, and Google says it can take up to 30 minutes. Standard reports can take a day or two to fill in. If Realtime stays empty, check the tag with Tag Assistant.

Is GA4 free to use?

Yes. Standard Google Analytics 4 is free for websites and apps. Google also sells Analytics 360, a paid version with higher limits and extra features, but most businesses never need it.

Should I install GA4 with Google Tag Manager or directly on my site?

Both work. Pasting the Measurement ID into your CMS or adding the code to your header is simplest for a small site. If you plan to track custom clicks, forms or other events, Google Tag Manager keeps all your tracking in one place and is easier to manage.

Where do I find my GA4 Measurement ID?

Go to Admin, open Data streams and click your web stream. The Measurement ID starts with G- and is shown in the stream details. You paste it into your CMS, plugin or Google Tag Manager.

Can I have more than one website in one GA4 property?

You can add more than one web data stream to a property, but it mixes the data in your reports. Use one property per website unless visitors naturally move between the sites as one journey. In that case, add cross-domain measurement.

Does GA4 keep my old Universal Analytics data?

No. GA4 is a separate property and does not import old Universal Analytics data. Standard Universal Analytics stopped processing data in July 2023, and Google shut off access to the old properties in July 2024. Your GA4 data starts from the day you install the tag.

Do I need a cookie banner for GA4?

In many countries, yes, because GA4 uses cookies. The rules depend on where your visitors are. If you have visitors from the European Economic Area and use Google Ads, Google also requires consent mode for ad personalisation and remarketing.

Why are my GA4 numbers different from my sales system?

Some visitors block tracking or decline cookies, so GA4 rarely matches your shop or CRM exactly. Time zone and currency settings can also cause gaps. Aim for numbers that follow the same trend, and investigate if the gap is very large.

Get the Next Guide in Your Inbox

Google updates, AI search changes and practical SEO guides. We email you when a new article is published, nothing else.

One email when we publish something new. No spam, unsubscribe in one click. Privacy

Written by Lovepreet Singh Digital Marketing Manager @ Softtrix
  • 12+ years in SEO
  • 331 articles
  • Punjab, India

Lovepreet Singh has been working in SEO for the last 12 years. He started as an SEO analyst, checking rankings and fixing on-page issues, and today he is Digital Marketing Manager at Softtrix Tech Solutions, looking after search and growth for client websites, from online stores to local service businesses.

  • AI Search & AEO
  • Technical SEO
  • Local SEO
  • Google Business Profile

Keep Reading