If you’ve been putting off setting up Google Analytics because you’re still on the old “Universal Analytics” (UA) — it’s time to act. UA is officially dead:
- Standard UA properties stopped collecting data on July 1, 2023
- UA 360 (premium) stopped on July 1, 2024
- All historical UA data has been permanently deleted
Everyone is on GA4 now. This guide walks you through setting it up from scratch. 📊
What Changed: GA4 vs. Universal Analytics
GA4 isn’t just an upgrade — it’s a different philosophy. Here’s the quick comparison:
| Universal Analytics | GA4 | |
|---|---|---|
| Tracking model | Session-based (pageviews) | Event-based (every interaction) |
| Views per property | Up to 25 | 1 |
| Cross-device tracking | Limited | Built-in (User ID) |
| IP anonymization | Optional | Always on |
| BigQuery export | GA360 paid only | Free |
| Debug tools | Basic | Built-in DebugView |
The biggest mental shift: in GA4, everything is an event — a pageview, a click, a form submission, a purchase. There are no more “goals” — instead, you mark events as Conversions.
Step-by-Step: Setting Up GA4 from Scratch
Step 1 — Create a Google Account
You need a Google account. If you already have Gmail, you’re set. If not, go to accounts.google.com and create one.
Step 2 — Go to Google Analytics
Navigate to analytics.google.com and sign in with your Google account.
Step 3 — Create a GA4 Account
Click Admin (the gear icon, bottom-left) → Create → Account.
Give your account a name (usually your company or website name). An Account is the top-level container — you might have one account with multiple properties underneath it (e.g. your main site + a mobile app).
Step 4 — Create a Property
A Property represents a single website or app you want to track.
- Enter a property name (e.g. “My Website”)
- Set your reporting timezone and currency
- Click Create
Step 5 — Create a Data Stream
A Data Stream is where the actual data flows in from. Choose your platform:
- Web — for a website
- iOS app — for an iPhone/iPad app
- Android app — for an Android app
For web: enter your website URL and a stream name, then click Create stream.
You’ll get a Measurement ID that looks like G-XXXXXXXXXX. Keep this handy — you’ll need it in the next step.
Step 6 — Install the Tracking Code
You have three options:
Option A — Manual (paste into HTML)
Copy the Google tag snippet and paste it immediately after the opening <head> tag on every page of your site:
1 2 3 4 5 6 7 8 | <!-- Google tag (gtag.js) --> <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> |
Replace G-XXXXXXXXXX with your actual Measurement ID.
Option B — Google Tag Manager
If you use GTM: create a new tag of type Google Tag, enter your Measurement ID, set it to fire on All Pages, and publish.
Option C — CMS Plugin
Most popular CMSes have native GA4 support:
- WordPress: Site Kit by Google plugin, or insert via a header plugin
- Shopify: Settings → Customer events → add GA4 pixel
- Squarespace / Wix: Analytics settings → connect GA4 with your Measurement ID
Step 7 — Verify It’s Working
Back in Google Analytics, go to Reports → Real-time.
Open your website in another tab and navigate around. Within a minute or two, you should see yourself show up as an active user in the Real-time report.
If you see data: you’re done. GA4 is live. 🎉
💡 Tip: Use Admin → DebugView for more detailed real-time event validation while testing. It shows every event as it fires — great for confirming your setup before you go live.
Quick Notes
- GA4 is free for most websites. Analytics 360 (the enterprise tier) starts at $50,000/year — skip it unless you’re a large enterprise.
- BigQuery export is free in GA4. In UA this was a paid GA360 feature. You can now pipe raw event data to BigQuery for custom analysis.
- You only get one data view per property in GA4 (UA had up to 25). Use filters and Explorations to segment data instead.
- Historical UA data is gone. GA4 starts fresh — your reports won’t show data from before you installed it.
Once tracking is running, explore the Acquisition, Engagement, and Retention report sections to understand where your visitors come from and what they do on your site.