Installing Google Analytics

How to Install Google Analytics 4

If you’re ready to start collecting real data about how visitors interact with your site, Google Analytics 4 (GA4) is where it all begins. It’s a critical step in understanding how to sell and what to build.

Whether you’re running an eCommerce store on Shopify or building a custom experience with WordPress, this guide will walk you through exactly how to install GA4 and verify that it’s working. We’re using Bricks Builder on WordPress, but if you’re not using Bricks Builder, don’t worry, you can do this on any WordPress site with a plugin called WP code. 

 Set Up Your GA4 Property

First you’ll need a gmail account, it works with your own domain as long as it’s hosted by Google. If you don’t already have a Gmail account you can sign up for one free here: Sign up for Gmail.

Once you’re all ready:

Setting Up Shopify

Use Shopify’s Google & YouTube Sales Channel. This is the easiest and most integrated way to connect GA4, especially if you plan to run Google Ads or use Google Merchant Center. The old way of modifying the theme.liquid file is really not recommended any more.  This method will give you better tracking through the check out process.

Install the Sales Channel

  • In Shopify Admin, go to Sales Channels (in the left Navigation Menu)> All Recommended Sales Channels

  • Select Google & YouTube and click Add Channel

Connect Google Account and GA4

Once it’s installed, it should take you through a setup process. If it doesn’t go to the new Google & YouTube channel under “Sales Channels” in your Shopify admin.

The first step is to add your google merchant account, but it’s not required. It is valuable later, but not critical at this stage. You can skip this step (Read below)

If you don’t want to set up a Google Merchant account, and just want to add analytics for now, you can skip the Merchant Account set up by clicking this:

You can Set up a Google ad account if you want to here as well, but it also gives you the option to skip.

And now… once you’ve completed all of the steps, you can go to Overview > Analytics, and connect your account!

Shopify will automatically handle script injection and enhanced eCommerce tracking—including product views, adds to cart, checkouts, and purchases.

✨ What You Get With This Integration:

  • Automatic GA4 tagging

  • Enhanced eCommerce events without manual event setup

  • Integration with Google Ads for conversion tracking (optional)

  • Product feed sync with Google Merchant Center (Optional)

Verify It’s Working

  • Open your site in a new incognito tab

  • Go back to your Google Analytics tab and on the home page you should see a visit.

  • If you want to make sure, Click the reports on the far left menu, then choose Realtime Overview.
  • You should see your visit appear within seconds

Installing GA4 on WordPress

There are multiple ways to add GA4 to a WordPress site—here’s how to do it cleanly through Bricks Builder without installing an extra plugin or on any WP site using WP Code.

Get Your GA4 Measurement ID

Same as above create an Analytics account. From Google Analytics, go to your GA4 property and grab the Measurement ID from:

Admin > Data Streams > Web Stream Details

Inject the Script with Bricks Builder

Bricks makes it easy to insert custom code into your site header.

Add to Header Globally

  1. In WordPress, go to Bricks > Settings > Custom Code

  2. Paste the GA4 code in the “Header” field:

html
<!-- 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>

Again, replace G-XXXXXXXXXX with your real ID.

  1. Click Save Settings

Bricks will inject this script across all pages, just like adding it to header.php—but with zero theme edits.

Inject the Script with WP Code

Install the Plugin, and add a new code snippet.

Similar to the Bricks Method, post the code with your measurement ID, and save it.

That’s it! You’re done!

Test Your GA4 Setup

  1. Go to your live site

  2. Open an incognito window and visit a couple of pages

  3. In GA4, check Reports > Realtime

  4. You should see your activity show up within a few seconds

If nothing shows up, double-check that:

  • You used the correct Measurement ID

  • The script is in the Header section (not Footer)

  • No caching plugin is blocking script updates

Something for Later: Use Google Tag Manager For Detailed Tracking

Once GA4 is collecting baseline data, you can start adding events to track things like:

  • Button clicks

  • Form submissions

  • Scrolling

  • Add-to-cart actions

Installing Google Analytics 4 is one of the most important steps you can take toward making data driven decisions. It will help you understand where visitors come from, what they care about, and how you can optimize their experience.

👉 Learn how here!

Need Some Help?

We’ve got you covered. We’re here to help if you have a couple of questions or looking for a partner to help get through the work.  Drop us a line and we’ll get back to you soon!

Get Help

How Can We Help?

Ventures
First
Last
Want to join our newsletter?
What Can We Help With?

How Can We Help?

Corporate Innovation
Want to join our newsletter?

How Can We Help?

Book a Call
Want to join our newsletter?

How Can We Help?

Resource Help
Name
Name
First Name
Last Name
Want to sign up for our newsletter?