GA4 & Analytics

How to Set Up GA4 for a B2B Website: Step-by-Step

Most GA4 setups I inherit are technically installed but practically useless — tracking everything, measuring nothing that matters. The problem usually starts before anyone opens the GA4 interface. Here's how to do it right from the start.

TL;DR

  • Start with a measurement plan — decide what to track and why before touching GA4.
  • Install via Google Tag Manager, not the gtag snippet directly. You'll thank yourself later.
  • Configure key events (conversions) for the actions that actually matter to your business.
  • Filter out internal traffic and verify everything in DebugView before trusting your reports.

Why most GA4 setups fail before they start

GA4 is installed on millions of websites. A much smaller number of those installations are actually useful. The gap between "GA4 is on the site" and "GA4 is telling us something valuable" is almost always caused by the same two mistakes: no measurement plan, and no verification step.

A measurement plan answers three questions before any tracking is implemented: What business decisions are we trying to make? What user actions connect to those decisions? How will we name and structure those events? Without it, you end up with a GA4 property full of auto-collected events that don't map to anything meaningful.

Step 1: Write your measurement plan

A measurement plan doesn't need to be elaborate. It can be a simple document or spreadsheet with three columns: the business objective, the user action that signals progress toward that objective, and the event name you'll use in GA4.

For a typical B2B site, the objectives might be: generate qualified leads, understand which content attracts the right audience, and measure engagement with key product or service pages. The corresponding events might be: form submission (contact or demo request), scroll depth on pillar content pages, and outbound click to a sales deck or case study.

Name your events clearly and consistently. GA4 uses snake_case by convention (form_submit, content_download). Avoid vague names like click or interaction — they'll be meaningless six months from now.

Step 2: Install via Google Tag Manager

You can install GA4 directly with a gtag snippet, but I recommend installing it through Google Tag Manager instead. GTM gives you a single place to manage all your marketing tags, makes it easy to add and modify tracking without touching the codebase, and integrates cleanly with Consent Mode v2.

To install GA4 via GTM: create a new tag in your GTM container, choose "Google Tag" as the tag type, enter your GA4 Measurement ID (it starts with G-), and set the trigger to "All Pages." Publish the container.

If you don't have GTM yet, set that up first. See my Google Tag Manager guide for a full walkthrough.

Step 3: Configure key events (conversions)

GA4 distinguishes between events (any action you track) and key events (the subset of events you designate as conversions). Key events appear in conversion reports and can be imported into Google Ads for bidding.

For most B2B sites, your key events should include form submissions — specifically your contact form, demo request form, or any gated content download. In GA4, go to Admin → Events → find the event → toggle "Mark as key event."

Don't mark everything as a key event. If every page view and every scroll is a conversion, your conversion data becomes meaningless. Be selective: only the actions that a human sales or marketing person would actually call a win.

Step 4: Filter out your own traffic

Internal traffic from your own team, your developers, and your agency will inflate your numbers and pollute your data if you don't filter it out. In GA4, go to Admin → Data Streams → your stream → Configure tag settings → Define internal traffic. Enter your IP addresses (and your agency's, if applicable).

Then go to Admin → Data Filters → Create filter → Internal Traffic filter → set to Active. Note that it takes 24–48 hours for this filter to start affecting your data.

Step 5: Set up Consent Mode v2

If your site has visitors in the EU or California, you need Consent Mode v2 configured before you go live with GA4. Without it, you're either collecting data from users who haven't consented (a compliance risk) or losing all visibility into non-consenting users (a data gap).

Consent Mode v2 works by having GA4 operate in a restricted mode for users who decline cookies — no identifiers are stored, but Google's modeling can still estimate aggregate behavior. See my Consent Mode v2 guide for implementation steps.

Step 6: Verify in DebugView

Before you declare your GA4 setup complete, verify it in DebugView. In GA4, go to Configure → DebugView. Then open your website in Chrome and add the Chrome extension "Google Analytics Debugger," or add ?gtm_debug=x to your URL to trigger GTM preview mode.

In DebugView you should see: a page_view event firing on each page load, your custom events firing when you trigger the corresponding actions, and your key events marked with a star.

If events aren't appearing, check GTM preview mode to see whether tags are firing. The most common culprit is a trigger condition that isn't being met, or a variable that's returning undefined.

What to look at first in your reports

Once GA4 is collecting clean data, resist the urge to live in the real-time report. The most useful views for B2B sites:

  • Acquisition → Traffic acquisition — Where is traffic coming from? Organic, paid, direct, referral? This tells you which channels are working.
  • Engagement → Pages and screens — Which pages are getting the most engaged visits? Filter by "Engagement rate" rather than just sessions.
  • Advertising → Conversions — Which sessions resulted in key events? Segment by source to understand which traffic converts.
  • Explore → Funnel exploration — Build a custom funnel from your key pages (e.g., homepage → services page → contact form → thank you) to see where drop-off happens.

Give your data two to four weeks to accumulate before drawing conclusions. GA4 needs volume to show meaningful patterns, and early data is often noisy while the internal traffic filter and consent mode settle in.

Need GA4 set up correctly the first time?

I implement GA4 via GTM with a full measurement plan, consent compliance, conversion tracking, and verified DebugView signoff — so you're collecting clean data from day one.

Get a quote