Complete GA4 Setup Guide for 2025
Introduction
Google Analytics 4 (GA4) is fundamentally different from Universal Analytics. If you're used to the old GA, you'll need to think differently about how you track and measure website performance.
This guide walks you through proper GA4 setup from scratch.
Why GA4 Matters in 2025
Universal Analytics stopped collecting data in July 2023. GA4 is now the only option, and it offers:
- Event-based tracking instead of session-based
- Better privacy controls to comply with regulations
- Machine learning insights for predictive analytics
- Cross-platform tracking (web + app in one property)
Prerequisites
Before starting, make sure you have:
- Google account with appropriate permissions
- Website with ability to add code snippets
- Google Tag Manager (optional but recommended)
Step 1: Create GA4 Property
- Go to analytics.google.com
- Click Admin (bottom left)
- Click "Create Property"
- Enter property name (usually your website name)
- Select timezone and currency
- Click "Next"
Step 2: Set Up Data Stream
- Choose platform: Web, iOS, or Android
- Enter website URL
- Name your stream
- Enable "Enhanced measurement" (recommended)
- Click "Create stream"
You'll receive a Measurement ID (format: G-XXXXXXXXXX)
Step 3: Install Tracking Code
Option A: Direct Installation
Add this code to the <head> section of every page:
<!-- 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>
Option B: Google Tag Manager (Recommended)
- Create GTM container
- Add GTM code to your site
- Create new tag in GTM: GA4 Configuration
- Add your Measurement ID
- Set trigger to "All Pages"
- Publish container
Step 4: Configure Enhanced Measurement
Enhanced measurement automatically tracks:
- Page views - Standard page tracking
- Scrolls - 90% page scroll depth
- Outbound clicks - Links to external sites
- Site search - Internal search queries
- Video engagement - YouTube video interactions
- File downloads - PDF, DOC, ZIP, etc.
Enable/disable specific events in: Admin > Data Streams > [Your Stream] > Enhanced measurement
Step 5: Set Up Conversions
- Go to Admin > Events
- Click "Create event" for custom events
- Or mark existing events as conversions
- Common conversions:
- Form submissions
- Product purchases
- Newsletter signups
- CTA button clicks
Step 6: Link to Google Search Console
- Go to Admin > Property Settings
- Click "Search Console Links"
- Click "Link"
- Select GSC property
- Choose data stream
- Submit and confirm
This enables search query data in GA4 reports.
Step 7: Create Custom Reports
GA4's default reports don't show everything. Create custom explorations:
- User acquisition - How users find your site
- Engagement - Time, scrolls, and interactions
- Conversions - Goal completions and value
- Retention - Returning visitor behavior
Step 8: Test Your Setup
- Visit your website
- Check GA4 Real-time report
- Verify events fire correctly
- Test conversions
- Use GA Debugger extension for troubleshooting
Common Setup Mistakes
- Not enabling enhanced measurement - Missing valuable data
- Skipping conversion tracking - Can't measure success
- Ignoring data filters - Internal traffic skews data
- Not linking GSC - Losing search performance insights
- No custom events - Default events aren't enough
Next Steps
After basic setup:
- Create custom audiences for remarketing
- Set up Google Ads linking
- Configure BigQuery export (for advanced users)
- Build custom dashboards in Looker Studio
Conclusion
GA4 has a learning curve, but proper setup is crucial. Take time to configure it correctly now, and you'll have clean, actionable data for years to come.
Written by
Web20Guru Team
Related Posts
AI Prompts for Content Marketing: Templates That Actually Work
Introduction AI writing tools like Claude and ChatGPT have transformed content marketing. But most people use terrible prompts and get mediocre results. The dif…
How to Use AI for Keyword Clustering and Content Strategy
Introduction Keyword clustering is the process of grouping related keywords into topic clusters. Instead of creating separate pages for dozens of similar keywor…
Local SEO Checklist: 27 Steps to Rank in Google Maps
Introduction Local SEO helps businesses appear in "near me" searches and Google Maps results. If you serve customers in specific locations, local SEO is your mo…