Last Updated on by Azib Yaqoob

Google Analytics 4 (GA4) is free, and setting it up takes about 15 minutes on WordPress, Shopify or Wix. The hard part isn’t installing it. It’s installing it once. Most broken GA4 setups I see have two or three copies of the tag added by different plugins, apps or people, and every visit gets counted twice.

This guide walks through the setup on each platform, then shows how to check it’s working.

Step 1: Create your GA4 property

  1. Go to analytics.google.com and sign in with the Google account your business uses.
  2. Click Admin → Create → Property. Enter your business name, time zone and currency. Use the same time zone and currency as your store or website, so your numbers line up.
  3. Choose Web as the platform and enter your website address.
  4. Copy the Measurement ID. It starts with G-.

Before adding anything, check whether GA4 is already installed: open your website, view the page source, and search for G- or googletagmanager. If you find an existing tag, find out where it comes from first.

Step 2: Install GA4 on your platform

Pick one GA4 install method per platform
Pick one install method for your platform, and only one.

WordPress

You have two good options. Use only one.

  • Site Kit by Google: the official plugin. Install it, connect your Google account, and turn on Analytics. It adds GA4 for you and shows basic reports in your dashboard. Best if you just want it to work.
  • Google Tag Manager: install GTM on your site (for example with a GTM plugin), then add a Google Tag with your G- ID inside GTM. Best if you’ll also track forms, ads or other tools later.

Avoid pasting the GA4 code into your theme as well as using a plugin. That’s the most common cause of double counting on WordPress.

Shopify

  1. Install the Google & YouTube app from the Shopify App Store.
  2. Connect your Google account and choose your GA4 property.
  3. The app sends page views and e-commerce events, including purchases, to GA4.

Then check Settings → Customer events and your theme code for any older GA4 code or custom pixels. If another app or a developer added GA4 too, remove it, or purchases may be counted twice.

Wix

  1. In your Wix dashboard, open Marketing Integrations (under Marketing & SEO).
  2. Choose Google Analytics, click connect, and enter your G- Measurement ID.

Wix needs a Premium plan and a connected domain for this to work.

Step 3: Check it’s working

  1. Open your site in a new browser window.
  2. In GA4, go to Reports → Realtime. You should see yourself within a minute.
  3. Turn off any ad blocker while you test. Ad blockers stop GA4 from loading, which makes it look broken when it isn’t.
  4. Click around and check that each page view appears once, not twice.

Step 4: Three settings worth changing on day one

  • Data retention: Admin → Data collection and modification → Data retention. Set event data retention to 14 months instead of the default 2, so your explorations can look back further.
  • Internal traffic: filter out your own visits, so your team doesn’t inflate the numbers.
  • Payment gateways: for online stores, add PayPal and similar gateways to the unwanted referrals list, so they don’t steal credit for your sales.
GA4 data retention settings
The data retention settings. Set event data to 14 months.

Step 5: Track what matters

Page views tell you who visited. Key events tell you who did something useful. Mark the actions that matter to your business as key events: go to Admin → Data display → Events and click the star next to each one:

Common mistakes

  • Installing GA4 through two methods at once.
  • Using a different time zone or currency in GA4 than in your store.
  • Leaving data retention at 2 months.
  • Testing with an ad blocker on and assuming GA4 is broken.

Related: Shopify GA4 not tracking purchases? 8 causes and fixes

Running an online store? I set up GA4 e-commerce tracking that matches your real orders, for Shopify and WooCommerce. See GA4 tracking setup or ask for a free tracking check.