How to Set Up Google Analytics 4 From Scratch

Emily RedmondData Analyst, EmilyticsApril 18, 2026

How to Set Up Google Analytics 4 From Scratch

By Emily Redmond, Data Analyst at Emilytics · April 2026

TL;DR: Create a GA4 property, install the measurement code (via Google Tag Manager or directly), verify data is flowing in real-time, and test custom events. The entire process takes 30 minutes for a basic setup.


Setting up GA4 is more straightforward than people think. The hard part isn't the installation—it's knowing what to do next. This guide walks you through the basics: property creation, code installation, data verification, and your first custom events.


Step 1: Create a Google Analytics Account and Property

If You're Starting Completely Fresh

  1. Go to analytics.google.com
  2. Click Create in the left sidebar
  3. Click Account
  4. Fill in your account name (e.g., "My Company"), agree to the terms, and click Create
  5. GA4 now prompts you to create a property

If You Already Have a GA4 Account

  1. Go to analytics.google.com
  2. In the left sidebar under Admin, click Create Property
  3. Continue from the next section

Step 2: Set Up Your First Property

  1. Property name: This is usually your website URL (e.g., "mysite.com"). You can change it later.

  2. Reporting time zone: Pick the timezone where your business operates. This affects when daily reports reset. You can't change this after creating the property, so get it right.

  3. Currency: Choose your primary currency (e.g., USD, EUR). This affects how GA4 displays revenue. You can track multi-currency transactions, but GA4 reports in your primary currency.

  4. Industry category: Pick your industry (or "General" if none fit). GA4 uses this for benchmarking recommendations.

  5. Business objectives: Check the boxes for what matters to you (e.g., "Increase sales," "Build audience"). These help Google surface relevant features.

  6. Click Create

GA4 now creates your property and prompts you to create a data stream.

💡 Emily's take: I once had to re-migrate an entire GA4 property because someone picked the wrong timezone. It doesn't sound like a big deal until you're trying to reconcile reports across teams on different schedules. Double-check your timezone. It's the one thing you can't easily fix later.


Step 3: Create a Data Stream

Your data stream is where the actual tracking happens. A property can have multiple streams (e.g., web, mobile app, a second domain).

  1. GA4 asks "Where do you want to collect data?"
  2. Select Web
  3. Fill in:
    • Website URL: The main domain (e.g., www.mysite.com)
    • Stream name: Something descriptive (e.g., "Website" or "Production")
  4. Click Create stream

GA4 generates a Measurement ID (starts with "G-"). This is what you'll put in your tracking code. Write it down or screenshot it.


Step 4: Install the Tracking Code

You have two options: Google Tag Manager (recommended) or direct gtag installation. If you're not sure, use GTM—it's more flexible and lets you add tracking later without touching code.

Option A: Google Tag Manager (Recommended)

  1. Go to tagmanager.google.com
  2. Create a GTM account (if you don't have one), pick a container type (Web), and enter your domain
  3. GTM gives you a Container ID (starts with "GTM-")
  4. Copy the two code snippets GTM shows you
  5. Paste the first snippet in your website's <head> tag (before </head>)
  6. Paste the second snippet right after your opening <body> tag
  7. Save and deploy

Now, connect GA4 to GTM:

  1. Back in GTM, click TagsNew
  2. Click the pencil to choose a tag type → Search for Google Analytics: GA4 Configuration
  3. Select it
  4. Paste your Measurement ID in the Measurement ID field
  5. Under Triggering, select Initialization - All Pages (this makes it fire on every page)
  6. Save the tag (name it "GA4 - Page View" or similar)
  7. Click Submit in the top right to publish

Within 5 minutes, data should start flowing into GA4.

Option B: Direct gtag Installation (Simpler but Less Flexible)

  1. Back in GA4, find your Measurement ID (top of the screen or in Admin → Data Streams → Web)
  2. Copy the code snippet GA4 provides
  3. Paste it in your website's <head> tag, right before </head>
  4. Save and deploy

Data should show up within 5 minutes.

💡 Emily's take: I recommend GTM even for simple sites. It's a tiny bit more setup, but six months later when you need to fire a custom event, you won't need a developer to touch code. GTM is a control panel for analytics. Use it.


Step 5: Verify Data is Flowing

Method 1: Google Analytics Real-Time Report

  1. Go to analytics.google.com → Your Property
  2. In the left sidebar, click Reports
  3. Look for Real-time at the top
  4. Visit your website in a new tab
  5. You should see "1 active user" appear within 30 seconds

If you see data, you're done with this step. If not, wait 5 minutes and try again. If still nothing, check:

  • Is the Measurement ID correct? Copy it from GA4 and compare to your tracking code
  • Is the tag/code actually deployed? Use the Chrome DevTools Network tab to see if GA4 requests are being made
  • Is an ad blocker blocking it? Try in an incognito window
  • Is your site using Content Security Policy (CSP)? It might be blocking GA4. Whitelist *.google-analytics.com and *.analytics.google.com

Method 2: Google Analytics Debugger Extension (More Detailed)

  1. Install the Google Analytics Debugger Chrome extension
  2. Enable it
  3. Visit your site
  4. Open Chrome DevTools (F12)
  5. Go to Console tab
  6. Look for a line like: GA4 Measurement request received: g_session_id=...

This tells you GA4 is definitely tracking. If you see it, you're good.


Step 6: Set Up a Test Property (Optional but Smart)

Before you start firing custom events or making changes, create a second property or data stream specifically for testing. This keeps messy test data out of your live reports.

  1. Go to AdminData Streams
  2. Click Create data stream
  3. Call it "Test" and enter a test domain or subdomain
  4. Get the new Measurement ID

Now you have two Measurement IDs: one for production, one for testing. In GTM, you can create separate tags for each using GTM's Preview mode to test new events on the test stream before pushing to production.


Step 7: Understand Your First Data

Visit your GA4 property and explore:

  • Real-time Report: See active users and recent events
  • Overview (under Reports): See user counts, new users, engagement metrics
  • EngagementPages and screens: See which pages people visit
  • Acquisition: Where traffic comes from

At this stage, you should see:

  • Pageviews
  • Page titles and URLs
  • Country, city, device type
  • Traffic source (direct, organic, referral, etc.)

This is the default data. To track what actually matters (sign-ups, add-to-cart, video plays, form submissions), you'll need to set up custom events.


Step 8: Your First Custom Event (Optional This Week, Essential Next Week)

Let's say you want to track clicks on a "Sign Up" button.

In GTM:

  1. Create a new trigger: ClickAll Elements → Add a filter (e.g., "Link text" "contains" "Sign Up")
  2. Create a new tag: Google Analytics: GA4 Event → Event name: sign_up → Add this trigger
  3. Publish

Verification:

  1. Go back to your website
  2. Click the "Sign Up" button
  3. In GA4 Real-Time, you should see a new event called sign_up fire

That's it. You've fired your first custom event.

For more complex custom events, see Understanding GA4 Events: A Plain-English Explainer.


Frequently Asked Questions

Q: How long until my data shows up in GA4? A: Real-time reports show data within ~5 minutes. Standard reports (in the "Reports" section) finalize within 24 hours. Don't panic if you don't see conversions in a report immediately—wait a full day.

Q: Do I need to update GA4 when Google releases new features? A: No, GA4 is cloud-based. You automatically get updates. Your reports might change layout or gain new options, but you don't need to do anything.

Q: Can I have multiple GA4 properties for the same website? A: Yes, but it's usually unnecessary. Multiple properties create fragmented data. One property, one data stream per domain, is standard. Use filters if you need to separate test traffic.

Q: What if my website uses a custom domain or subdomain? A: When creating a data stream, enter your full domain (e.g., subdomain.mysite.com). GA4 will automatically track it. If you have multiple subdomains, you can track them all in one property using filters or domain settings.

Q: Is the free version of GA4 really free? A: Yes. You get real-time data, custom events, up to 30 conversions, audiences, Explorations, and BigQuery export. The only limitations are on data retention (2 months by default, extendable to 14 months) and no data-driven attribution model. For most teams, free is enough.

Q: What's the difference between GTM and direct gtag installation? A: GTM is a tag management platform—you manage all your tracking through it without touching code. Direct gtag is just installing the GA4 code directly. GTM is more flexible and scales better; direct gtag is simpler if you have no other tags.


The Bottom Line

GA4 setup takes 30 minutes. The real work—figuring out what to track and building out custom events—takes weeks. But you've got the foundation. Now move to Understanding GA4 Events: A Plain-English Explainer to start tracking what matters.


Emily Redmond is a data analyst at Emilytics — the AI analytics agent that watches your GA4, Search Console, and Bing data around the clock so you never miss what matters. 8 years of experience helping founders and growth teams turn data noise into clear decisions. Say hi →