Google Analytics 4 and WordPress: Complete Setup Guide for 2026 

Google Analytics 4 is now the standard analytics platform for WordPress websites. Discover how to install GA4, connect Search Console, and track conversions and WooCommerce purchases correctly.

Google Analytics 4

Google Analytics 4 has been the only version of Google Analytics since July 2023 — Universal Analytics is fully deprecated and no longer processes data. If your WordPress site is still running a GA3/UA tracking code (ID format: UA-XXXXXXXX-X), you have no current analytics data. The switch to Google Analytics 4 is not optional.

Google Analytics 4 is also significantly more powerful than Universal Analytics. Event-based tracking, cross-device measurement, built-in machine learning insights, and native Google Ads integration make it a better analytics platform for 2026. This guide covers the complete WordPress setup — including WooCommerce e-commerce tracking.

Method 1 — Connect Google Analytics 4 via RankMath (Recommended)

If you use RankMath Pro (which we configure on all Hopeleaf projects), you can connect GA4 directly in RankMath > General Settings > Analytics. This is the cleanest method — no additional plugin needed, and GA4 data appears directly in your WordPress dashboard.

  1. Go to analytics.google.com and create a Google Analytics 4 property for your WordPress site
  2. Get your Measurement ID (format: G-XXXXXXXXXX) from Admin > Data Streams > Web
  3. In WordPress, go to RankMath > General Settings > Analytics > Connect your Google account
  4. Select your GA4 property from the dropdown
  5. RankMath will display GA4 data (top pages, search keywords, click-through rates) inside your WordPress dashboard

Method 2 — Site Kit by Google (Free Plugin)

Google’s official Site Kit plugin installs GA4, Search Console, and Google AdSense directly into WordPress. Install from Plugins > Add New, activate, click ‘Sign in with Google’, follow the authorisation flow, select your GA 4 property. Site Kit adds a dashboard widget in WordPress showing key Google Analytics 4 metrics.

Method 3 — Google Tag Manager (Most Flexible)

For advanced tracking setups, install Google Tag Manager on your WordPress site and deploy GA4 through GTM. Install the ‘GTM4WP’ plugin, add your GTM container ID, and configure GA4 as a tag inside GTM. This method gives you complete control over what events fire and when — essential for complex e-commerce or lead generation tracking.

Setting Up WooCommerce E-Commerce Tracking in Google Analytics 4

Google Analytics 4 e-commerce tracking measures add-to-cart events, checkout steps, and purchases — essential data for optimising a WooCommerce store. The easiest method:

  1. Install the ‘Google Analytics 4 for WooCommerce’ plugin by GTMKit (free)
  2. Connect your Google Analytics 4 Measurement ID in the plugin settings
  3. The plugin automatically fires Google Analytics 4 e-commerce events: view_item, add_to_cart, begin_checkout, purchase
  4. Verify in GA4 > Reports > Engagement > Events — within 24 hours you should see WooCommerce events appearing

Connecting Google Search Console to GA4

Linking Search Console to GA4 lets you see organic keyword data alongside your GA4 engagement metrics — which keywords bring visitors and how those visitors behave on site.

  1. In GA4, go to Admin > Product Links > Search Console Links
  2. Click the link and select your Search Console property
  3. In GA4 Reports, you’ll now see a ‘Google Organic Search Traffic’ report under Acquisition

Key GA4 Reports for WordPress Sites in 2026

  • Engagement > Pages and Screens — your most viewed pages, average engagement time per page
  • Acquisition > Traffic Acquisition — where your visitors come from (organic, direct, social, referral)
  • Engagement > Events — all tracked user interactions (clicks, scrolls, form submissions)
  • Monetisation > E-Commerce Purchases — if WooCommerce tracking is set up
  • Explore > Funnel Exploration — visualise your checkout or lead gen funnel step by step
Every WordPress Site We Build Includes GA4 Setup

Hopeleaf Technologies configures GA4, connects Search Console via RankMath, sets up conversion tracking, and verifies WooCommerce e-commerce events before launch. 

 

We Build Every Site in Elementor Pro

Hopeleaf Technologies is a specialist Elementor agency — we design in Figma and build in Elementor Pro on WordPress. Fast, editable, and built to rank on Google.

Share with:
Articles

Related News