Guide

How to set up Google Analytics 4 for a startup website

How to set up Google Analytics 4 for a startup website

In short: Setting up Google Analytics 4 takes four steps: create a GA4 property in your Google Analytics account, generate a web data stream, install the tracking tag (via Google Tag Manager or a direct gtag.js script), and verify that events are flowing in DebugView. Done correctly, you'll have event-based tracking and a clean measurement baseline from day one, with no session-and-pageview model limitations of old Universal Analytics.

Setting up Google Analytics 4 for a startup website is the first measurement decision you'll make, and it shapes every traffic and conversion report you'll ever read. The four-step process below - create a property, configure a data stream, deploy the tag, and verify - is the same whether you're on a custom React stack, WordPress, or Webflow.

If you are building SEO from scratch, start with the overview in SEO for startups: where to start, then use this post for the detail on set up google analytics 4.

> Before you start: you need a Google account with Admin access to the site you're instrumenting, and - if you're using Google Tag Manager - a published GTM container. The setup itself takes 20-30 minutes.

What is Google Analytics 4, and how is it different from universal analytics?

GA4 is Google's current analytics platform, built on an event-based data model. Every user interaction - page view, scroll, click, form submission - is recorded as a named event with attached parameters, rather than the session-and-pageview model Universal Analytics used.

The practical differences that matter for a startup:

  • No session expiry at midnight. GA4 sessions are activity-based, so cross-midnight journeys don't fragment artificially.
  • Built-in cross-device tracking. If a user visits on mobile then converts on desktop, GA4 ties those into one user journey by default (when User ID or Google Signals is configured).
  • Machine learning fills data gaps. GA4 uses modeled data to estimate conversions it can't observe directly due to consent or ad-blocker gaps.
  • Free BigQuery export. You can pipe raw event data to BigQuery without a GA4 360 license - Useful for startups who want to join analytics data to their CRM.
  • Universal Analytics is gone. Google shut down standard Universal Analytics properties on July 1, 2024, so GA4 is the only free option.

How to set up Google Analytics 4: step-by-step

Optimizely's GA4 setup documentation describes the same four-step sequence regardless of platform. Here's the full procedure with the exact UI labels.

Step 1: create a GA4 property

  1. Go to analytics.google.com and sign in.
  2. Click Admin (gear icon, bottom left).
  3. In the Account column, select or create the Account you want this property to live under. An Account is the top-level container (usually your company name); Properties sit inside it.
  4. In the Property column, click Create property.
  5. Enter your Property name (e.g. Acme SaaS - Production) in the field provided.
  6. Select your Reporting time zone and Currency. Get this right now - you can't easily change the time zone after data starts flowing without creating a gap in historical reports.
  7. Click Next, fill in the business details (category, size), and click Create.

> One property per environment. Run separate GA4 properties for Staging/Sandbox and Production. This prevents test traffic from contaminating your numbers. Optimizely's own implementation docs recommend implementing on Sandbox first, verifying accuracy, then recreating on Production.

Step 2: create a web data stream

A data stream is the source connection between your website and the GA4 property. One property can hold multiple streams (web, iOS, Android), but for a startup website you need one web stream.

  1. After creating the property, GA4 prompts you to Add a data stream automatically. If you've navigated away: Admin > Data collection and modification > Data streams > Add stream > Web.
  2. Enter your Website URL (include https://) and a Stream name.
  3. Leave Enhanced measurement toggled on. This auto-tracks scroll depth, outbound clicks, site search, video engagement (YouTube embeds), and file downloads without any extra code.
  4. Click Create stream.
  5. On the stream detail page, copy your Measurement ID - it looks like G-XXXXXXXXXX. You'll need this in Step 3.

Step 3: install the GA4 tag on your site

You have two paths. Google Tag Manager is the better choice for almost every startup because it decouples tag management from your codebase.

#### Option A: Google Tag Manager (recommended)

If you don't have a GTM container yet, create one at tagmanager.google.com and install the GTM snippet in your site's <head> and <body>. Then:

  1. In GTM, go to Tags > New.
  2. Click Tag Configuration, choose Google Tag (previously "GA4 Configuration").
  3. In the Tag ID field, paste your Measurement ID (G-XXXXXXXXXX).
  4. Click Triggering, choose All Pages (the Initialization - All Pages trigger fires before other tags and is the right choice for the base GA4 config tag).
  5. Name the tag (e.g. GA4 - Base Configuration) and click Save.
  6. Click Submit in the top-right, add a version name, and Publish.

#### Option B: Direct script (no GTM)

Paste the following into the <head> of every page, replacing G-XXXXXXXXXX with your Measurement ID:

```html

<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>

<script>

window.dataLayer = window.dataLayer || [];

function gtag{dataLayer.push(arguments);}

gtag('js', new Date);

gtag('config', 'G-XXXXXXXXXX');

</script>

```

Most modern site builders - Webflow, Framer, Wix, Squarespace - have a native "Head Code" or "Custom Code" field where this script goes. WordPress users: the Insert Headers and Footers plugin or a theme's functions.php are the two standard locations. Don't paste it into the body or a widget - the tag must fire on every page load, including 404s and thank-you pages.

Step 4: verify the tag is firing

DebugView is the fastest way to confirm everything is working before you rely on it.

  1. With your site open in one browser tab, go to GA4 Admin > DebugView in another.
  2. You should see your own events (page_view, session_start, first_visit) appearing in real time within 30-60 seconds.
  3. If you're using GTM, use the Preview mode (the magnifying glass icon) before publishing - it shows you every tag that fired on each page load and why, including any that failed.

If no events appear after two minutes:

  • Confirm the GTM container snippet is present in the page source (right-click > View Page Source, search for GTM-).
  • Check that you published the GTM container (a saved-but-unpublished container deploys nothing).
  • Check for a Content Security Policy (CSP) header blocking googletagmanager.com - common in security-conscious SaaS apps.

Expected output in DebugView after a correct install:

```

session_start → params: session_id, engagement_time_msec

first_visit → params: session_id

page_view → params: page_location, page_title, page_referrer

scroll → params: percent_scrolled (fires at 90% by default)

```

Once you see these four events in DebugView, your base GA4 setup is working.

How do you configure conversions in GA4?

A conversion in GA4 is simply any named event you've marked as a key event. Out of the box, purchase and first_visit are marked as key events. For a SaaS startup, you'll want to add:

  • generate_lead (form submission on a demo or trial page)
  • sign_up (completed registration)
  • begin_checkout or a custom event like trial_started

To mark an event as a key event:

  1. Go to Admin > Data display > Key events.
  2. Click New key event.
  3. Type the exact event name (case-sensitive: generate_lead, not Generate_Lead).
  4. Click Save.

Key events appear in most GA4 reports under the "Key events" column and can be imported into Google Ads for Smart Bidding. You don't need to configure goals in a separate view anymore - the event IS the conversion signal.

What should a startup track in GA4 from day one?

The honest answer: less than you think. Tracking 40 custom events before you have 500 monthly visitors creates noise, not insight. Set up the base configuration, mark your two or three highest-intent events as key events, and leave the rest until you have traffic to analyze.

The table below covers what to instrument at each stage.

StageMonthly sessionsRecommended tracking
Pre-launch / beta< 500Base config + DebugView verification only
Early traction500-5,000Key events: sign_up, generate_lead, page_view by source
Growth5,000-50,000Add scroll depth analysis, UTM discipline, Looker Studio dashboard
Scale50,000+BigQuery export, custom dimensions for plan/segment, funnel exploration reports

One discipline that pays back from day one: UTM parameters on every non-organic link. GA4 has no way to distinguish a Substack newsletter click from a LinkedIn post click unless you tag the URL. Use a consistent naming convention (utm_source=linkedin&utm_medium=social&utm_campaign=launch-week) and apply it every time you share a link externally.

PlatformMethodWhere to paste the code
WordPressGTM via plugin, or Insert Headers and Footers pluginGTM container snippet in `<head>`, or plugin's "Scripts in Header" field
WebflowGA4 direct script or GTMProject Settings > Custom Code > Head Code
FramerGA4 direct scriptSite Settings > General > Custom Code > Start of `<head>`
WixWix Marketing Integrations panel or GTM via Wix appWix Settings > Marketing Integrations > Google Analytics
Next.js / React`next/script` component with `strategy="afterInteractive"``_app.tsx` or `layout.tsx`
Webflow + MemberstackGTM recommendedGTM handles both GA4 and Memberstack events in one container

For Next.js specifically, avoid putting the gtag script in a plain <Script> tag without a strategy prop - it'll block rendering. The correct implementation:

```jsx

// In _app.tsx or app/layout.tsx

import Script from 'next/script'

<Script

src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"

strategy="afterInteractive"

/>

<Script id="gtag-init" strategy="afterInteractive">

{`

window.dataLayer = window.dataLayer || [];

function gtag{dataLayer.push(arguments);}

gtag('js', new Date);

gtag('config', 'G-XXXXXXXXXX');

`}

</Script>

```

What data does GA4 collect automatically?

GA4 with Enhanced Measurement enabled auto-tracks the following events with zero additional code:

Event nameWhat triggers it
`page_view`Every page load or history change (SPAs)
`scroll`User reaches 90% of page depth
`click`Outbound link clicks (links leaving your domain)
`view_search_results`Internal site search (if `?q=` or `?s=` is in the URL)
`video_start` / `video_progress` / `video_complete`YouTube embeds with JS API enabled
`file_download`Clicks on PDF, ZIP, DOCX, and other file types
`session_start`First event of a new session
`first_visit`First time the browser has visited (per device)
`user_engagement`Minimum 10 seconds on page, or key event fired

This is a reasonable baseline. You don't need to write custom event code for most of these - the main gap Enhanced Measurement doesn't cover is form submissions (unless you're using a form platform with a native GA4 integration) and in-app product events behind a login wall.

GA4 for a SaaS startup versus a simple marketing site: what's different?

A marketing-only site tracks acquisition and lead generation. A SaaS product also has a product layer - sign-up flows, onboarding steps, plan upgrades, churn events - and GA4 isn't always the right tool for all of it.

  • For the marketing site: GA4 handles everything described above out of the box.
  • For in-product events: Most SaaS teams layer Mixpanel, Amplitude, or PostHog on top of GA4 for the product analytics layer. GA4 can receive product events via the Measurement Protocol, but the query interface (Explorations) is less ergonomic than a dedicated product analytics tool for cohort and retention analysis.
  • For revenue attribution: GA4's purchase event and ecommerce schema work well for self-serve SaaS where checkout happens on the site. Sales-assisted deals tracked in a CRM need a separate attribution model - GA4 can't close that loop natively.

The short version: set up GA4 first, use it to own your marketing-site measurement, and revisit the product analytics tooling once you know what questions you're trying to answer.

How does Google Analytics 4 connect to search visibility?

GA4 tells you what happens after someone lands on your site. It doesn't tell you how many people saw your page in search results and chose not to click, and it won't surface the keywords driving organic traffic (that data lives in Google Search Console, not GA4).

To get the full picture, connect both:

  1. In GA4: Admin > Property settings > Search Console links > Link.
  2. Select your verified Search Console property and click Next > Submit.

Once linked, the Acquisition > Search Console > Landing pages report in GA4 shows organic clicks, impressions, click-through rate, and average position alongside GA4's session and conversion data - on the same row, for the same landing page. That joint view is where SEO and product decisions converge.

If you're building out your startup's organic presence alongside the measurement setup, the basics of startup SEO covers what to prioritize structurally before you start publishing. And if you're still deciding whether now is the right time to invest in organic at all, the startup SEO timing guide is worth reading before you scale content spend.

What is the difference between a GA4 property and a data stream?
A GA4 property is the container that holds all your data and settings - think of it as the account for one website or product. A data stream is the source that feeds data into that property: a web stream for your site, or separate iOS/Android streams for mobile apps. One property can have multiple streams, but all streams inside one property share the same reports and settings.
How long does it take for GA4 to show data after setup?
Standard reports in GA4 have a processing delay of 24-48 hours from when events fire. DebugView shows real-time data within seconds and is the right tool for verifying your setup. The Realtime report (under Reports > Realtime) shows a rolling 30-minute window of live activity. Don't make decisions from the Realtime report - it's a verification tool instead of an analytics surface.
Do i need Google tag manager to use GA4?
No. You can install GA4 by pasting the gtag.js snippet directly into your site's `<head>`. GTM is recommended because it lets non-engineers add and update tags without code deployments, and it makes debugging much easier via Preview mode. For a solo founder on a fast-moving site, the direct script is fine to start.
What is the GA4 measurement ID and where do i find it?
The Measurement ID is a unique identifier for your GA4 web data stream, formatted as `G-XXXXXXXXXX`. Find it at: GA4 Admin > Data collection and modification > Data streams > [your stream] > Measurement ID (top right of the stream detail panel). It's what you paste into GTM's Google Tag configuration or into the `gtag('config',...)` call.
Can i use GA4 and universal analytics at the same time?
No. Google permanently shut down standard Universal Analytics properties on July 1, 2024. If you have legacy UA reports you want to preserve, export the data to BigQuery or download CSVs before those exports expire - the data retention window varies. All new measurement must be GA4.
How do i stop GA4 from tracking my own visits?
The standard approach is to filter internal traffic by IP address. Go to **Admin > Data streams > [your stream] > Configure tag settings > Define internal traffic**, add your office or home IP in CIDR notation, then go to **Admin > Data collection and modification > Data filters**, create an Internal Traffic filter, and set it to **Active**. Note: the filter applies to events recorded after it's activated; it doesn't remove historical internal traffic already recorded. ---

Bottom line

GA4 setup is a 20-30 minute task, but the decisions you make in those 30 minutes - separate properties for staging and production, UTM discipline from day one, the right key events marked as conversions - determine whether your analytics are useful six months from now or just a dashboard that sits open and ignored.

Get the base configuration right, link Search Console, and resist the temptation to instrument everything - clean data on three key events beats messy data on thirty.

Once your setup is confirmed, the next question is whether the traffic you're measuring is growing.

At Quiet Branding, we work with early-stage B2B SaaS founders on SEO and GEO content - structured so Google can rank it and AI engines can cite it. We analyzed 1,585 B2B SaaS companies (screening 2,654, reverse-engineering 238 winning blogs) to learn exactly what drives ranking and citation, and every post we publish is copywriter-edited against that data.

If you're at the stage where you're setting up GA4, you're probably also deciding when to start investing in SEO and how much to budget for it. Those two posts will give you the numbers to make that call. When you're ready to have someone else run the content program, see what Quiet Branding does differently.

Quiet Branding is a managed SEO and GEO service for early-stage B2B SaaS. We turn our study of 1,585+ B2B SaaS companies into content that helps your startup rank on Google and get cited by AI search. If you want to talk through what that would look like for your business, book a discovery call.

Keep reading

How to use Google Search Console to track your SEO
Guide

How to use Google Search Console to track your SEO

10 min read
How to write a blog post that gets cited by AI search
Guide

How to write a blog post that gets cited by AI search

10 min read
Recruitment agency rebate clauses explained
recSEO

Recruitment agency rebate clauses explained

10 min read