Setting Up Google Analytics
Learn how to set up Google Analytics 4 (GA4) correctly so you can measure traffic, user behavior, and conversions on your WordPress website.
Estimated time: 20–30 minutes • Level: Beginner
What You’ll Learn
- How to create a Google Analytics account and GA4 property.
- How to install Google Analytics on WordPress.
- How to verify the tracking code is working.
- How to set up basic event tracking and conversions.
Why Google Analytics Matters
Google Analytics shows how visitors use your website. With it, you can measure:
- How many people visit your site.
- Which pages they view most.
- How long they stay.
- What traffic sources bring you the most leads.
- How users interact with forms, buttons, and CTAs.
Without analytics, you’re guessing. With it, you’re making data-driven decisions.
Step-by-Step: Setting Up Google Analytics
-
Create a Google Analytics Account
Go to analytics.google.com and sign in with your Google account.
- Click Start Measuring.
- Enter an account name.
- Choose data-sharing settings (optional).
-
Create a GA4 Property
- Name your property (e.g., “My Business Website”).
- Select your time zone and currency.
- Choose your business category and size.
- Select your measurement goals.
-
Set Up a Web Data Stream
- Select Web as your platform.
- Enter your website URL (https://yourwebsite.com).
- Enable Enhanced Measurement (scroll tracking, outbound clicks, search).
- Copy your Measurement ID (format: G-XXXXXXX).
-
Install Google Analytics on WordPress
You can install GA4 using one of three methods:
- Method 1 (Easiest): Use a plugin like Site Kit by Google.
- Method 2: Use an SEO plugin like Rank Math or SEOpress.
- Method 3 (Manual): Add the tag code inside your theme’s
<head>section.
Site Kit method:
- Install “Site Kit by Google.”
- Click Set Up Site Kit.
- Connect your Google account.
- Enable Analytics and select your GA4 property.
-
Verify Your Tracking Code
After installing GA4, verify it’s tracking:
- Open your website in a new tab.
- Go to Google Analytics → Reports → Realtime.
- You should see “1 active user” (your visit).
If not showing, clear cache and check plugin settings.
-
Set Up Key Conversions
Conversions help you measure goals such as:
- Contact form submissions
- Phone number clicks
- Button clicks
- Bookings or purchases
In GA4:
- Go to Admin → Events.
- Find an event and toggle it on as a conversion.
How to Use Google Analytics Data
- Traffic sources: See how people find your site.
- Top pages: Understand what content performs best.
- User behavior: Check scroll depth and engagement.
- Conversions: Track leads and sign-ups.
- Devices: Compare mobile vs desktop traffic.
WordPress & Elementor Tips
- Place your tracking code early—ideally via Site Kit or your SEO plugin.
- Avoid installing multiple analytics plugins (conflicts).
- If using a caching plugin, enable “analytics exclusions” to prevent blocking.
- Exclude logged-in admins from tracking to avoid inflated data.
Mini Exercises (10–15 Minutes)
- Create a GA4 property if you haven’t already.
- Install and connect Google Site Kit.
- Visit your site and confirm it appears under Realtime reports.
- Turn a key event (form submission or button click) into a conversion.
Google Analytics Setup Checklist
- GA4 property created and linked.
- Measurement ID installed via Site Kit or SEO plugin.
- Realtime tracking confirmed.
- Basic events enabled (scroll, outbound clicks, Search).
- Primary conversion marked.
- Admin traffic excluded (optional).