Step-by-step guide to setting up GA4 from scratch. Covers property creation, tracking code installation (gtag.js and GTM), data streams, key events, enhanced measurement, audience creation, Google Ads linking, BigQuery export, and data retention configuration.
Last updated: March 2026 · Reading time: 18 min
“I still audit GA4 properties where the team installed the tag 18 months ago and never touched it again. They’re collecting page views and sessions but have zero custom events, no audiences built, no Google Ads link, and data retention set to the 2-month default. That’s not analytics. That’s a counting machine. Proper GA4 setup takes half a day. The data it gives you back is worth thousands.” Hardik Shah, Founder of ScaleGrowth.Digital
gtag.js is Google’s JavaScript tagging framework that sends data directly to GA4. It requires adding a code snippet to every page of your site, typically in the <head> section.
Option 1: Google Tag Manager (recommended)
<head> and one after the opening <body> tag).<head> section of every page on your site. This approach works but makes future event tracking harder because every change requires a code deployment.
Option 3: CMS plugin
WordPress users can install GA4 through plugins like Site Kit by Google (official Google plugin), MonsterInsights, or by pasting the tracking code into their theme’s header. Shopify, Squarespace, Wix, and other platforms have built-in GA4 integration where you just paste your Measurement ID into the settings.
Whichever method you choose, verify the installation immediately using GA4’s Realtime report or DebugView (covered in the verification section below).
| Event | What It Tracks | Recommendation |
|---|---|---|
| Page views | Every page load and browser history change (SPA support) | Always on |
| Scrolls | When user scrolls past 90% of page height | On (but consider custom scroll tracking at 25/50/75% via GTM for more granular data) |
| Outbound clicks | Clicks on links leading to external domains | Always on |
| Site search | When users search within your site | On if you have site search. Verify the query parameter matches your search URL structure. |
| Video engagement | YouTube embedded video starts, progress (10%, 25%, 50%, 75%), and completions | On if you use YouTube embeds. Doesn’t track Vimeo or self-hosted video. |
| File downloads | Clicks on links to files (.pdf, .xlsx, .docx, .zip, etc.) | Always on |
| Form interactions | Form starts and submissions | On, but verify it works with your form setup. Some forms (AJAX-based) may not trigger correctly. |
Key event is a GA4 event that you’ve flagged as a significant business outcome, such as a form submission, purchase, or sign-up. Key events appear in dedicated reports and can be imported into Google Ads for campaign optimization.To mark an event as a key event:
events_YYYYMMDD. Each row in the table represents one event with all its parameters, user properties, and session context.
BigQuery storage costs are roughly $0.02 per GB per month. A site with 100,000 monthly sessions typically generates 1-5 GB of data per month, costing $0.02-$0.10 in storage. Query costs are $5 per TB scanned, but most marketing queries scan under 1 GB. For practical purposes, BigQuery export is free or near-free for small to mid-size sites.
The complete guide to setting up event tracking in GA4, covering all four event types, GTM implementation, and DebugView verification. Read Guide →
Build consistent UTM parameters for your campaigns so GA4 attributes traffic to the right sources. Use Tool →
A reporting template that pulls from GA4 data to create client-ready or executive marketing reports. Get Template →
Yes. GA4 is free for all users with no limit on the number of events collected. Google also offers Analytics 360 as a paid enterprise version with higher data limits, SLAs, and additional features, but the standard free version handles the needs of most businesses including BigQuery export.
Realtime reports show data within 30 seconds of installation. Standard reports take 24-48 hours to populate. Some reports like attribution and audience insights need 7-14 days of data before they produce meaningful results. Don’t make setup decisions based on the first 48 hours of data.
Use Google Tag Manager for most implementations. GTM gives you a visual interface for managing tags, preview and debug tools, version control, and the ability to update tracking without code deployments. The only case for direct gtag.js is extremely simple sites with no custom events.
Universal Analytics stopped processing new data on July 1, 2023. Historical UA data remained accessible until July 2024, after which it was permanently deleted. GA4 is now the only version of Google Analytics available. If you haven’t migrated, you need to set up GA4 from scratch.
Create a separate GA4 property for each website. Each property gets its own data stream and Measurement ID. You can manage multiple properties under one Google Analytics account. If you need to compare data across sites, export both properties to BigQuery and query them together.
We configure GA4 properties with proper event tracking, audience setup, Google Ads integration, and custom reporting. From basic setup to advanced measurement plans. Get Analytics Help →