How to Set Up Google Google Analytics 4

Cody Schneider8 min read

Getting Google Analytics 4 up and running is the first critical step toward understanding how people find and interact with your website. This guide will walk you through the entire process, whether you're starting from scratch or using a platform like WordPress or Shopify. We’ll cover everything you need to know to create your property and start collecting valuable data.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

First, a Quick Look at GA4 vs. Universal Analytics

If you've used Google Analytics before, you'll notice GA4 is different. The previous version, Universal Analytics (UA), was built around the concepts of "sessions" and "pageviews." GA4 is designed for the modern web and is built around "events."

Think of it like this:

  • Universal Analytics (Old): Measured a user's visit (a session) as a container for all the things they did, like viewing different pages.
  • Google Analytics 4 (New): Measures every single interaction as a distinct event. A page view is an event, a button click is an event, a form submission is an event, and a purchase is an event.

This event-based model gives you a much more flexible and accurate view of the entire customer journey, from the first time someone visits your site to the moment they convert.

Method 1: Setting up a Brand New GA4 Account

If you’ve never used Google Analytics before, this is your starting point. You’ll be creating a new account, a new property, and a new data stream from scratch.

Step 1: Create Your Google Analytics Account

First, you need a main Google Analytics account, which acts as a container for your properties (your websites and apps).

  1. Go to the Google Analytics website and click Start measuring.
  2. Account Setup: You'll be prompted to create an account. For "Account name," enter your business or organization's name.
  3. Account Data Sharing Settings: Review the data sharing options. These control how your account data is shared with other Google services. The default settings are fine for most users. Click Next.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Create a GA4 Property

A "property" represents your website or app. You can have multiple properties within a single account.

  1. Property name: Enter a name that clearly identifies your website, e.g., "My Business Website."
  2. Reporting time zone: Select the time zone your business operates in. This ensures your daily reports align with your actual business day.
  3. Currency: Choose the currency you use for transactions, like USD for United States Dollar. Click Next.

Step 3: Provide Your Business Details

Google will ask for some general information about your business, like your industry category and size. This is used to tailor your experience with benchmarks and relevant insights. Answer the quick questions and click Create. Agree to the Google Analytics Terms of Service to finalize the setup.

Step 4: Set Up Your Data Stream

A "data stream" is the source of your data. For a website, this is how information flows from your site into your GA4 property.

  1. After creating your property, you'll be asked to choose a platform. Select Web.
  2. Enter your website's URL (e.g., www.yourwebsite.com) and give the stream a name (e.g., "Main Website Stream").
  3. One of the best features of GA4 is Enhanced measurement, which is enabled by default. This automatically tracks key events like scrolls, outbound clicks, site searches, and file downloads without you having to set them up. It's a huge time-saver, so keep it turned on.
  4. Click Create stream.

You will now see a "Web stream details" page. Don't close this tab! It contains a crucial piece of information you’ll need in a moment: the MEASUREMENT ID. It will look something like "G-XXXXXXXXXX."

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: Migrating from Universal Analytics with the GA4 Setup Assistant

Universal Analytics was fully phased out in July 2023, but if you're working with an older property, you might see a prompt to migrate. Google created a handy tool called the "GA4 Setup Assistant" for this.

  1. Log in to your existing Universal Analytics property.
  2. Go to the Admin section (look for the gear icon in the bottom-left corner).
  3. In the "Property" column, the very first option should be GA4 Setup Assistant. Click on it.
  4. Click the blue Get started button under "I want to create a new Google Analytics 4 property."

The wizard will create a new GA4 property for you that's connected to your existing Universal Analytics property. It can sometimes automatically copy over some basic settings, but it doesn't transfer your historical data. Your new GA4 property starts collecting data from a clean slate.

After the assistant is finished, you still need to install the GA4 tracking tag on your website, which is our next step.

Part 3: Installing the GA4 Tracking Tag on Your Website

Creating your property is just the first half. To actually start tracking visitor data, you need to add a small snippet of code - the GA4 tag - to your website. Here are the three most common ways to do it.

Option A: Using Google Tag Manager (Recommended)

Google Tag Manager (GTM) is a free tool that allows you to manage all of your website's tracking codes (or "tags") from one central dashboard. This is the most flexible and scalable way to handle tracking.

  1. Find and copy your Measurement ID (the one starting with "G-") from your GA4 web stream details page.
  2. Log in to your Google Tag Manager account.
  3. Select your website's container, then go to Tags > New.
  4. Give your tag a descriptive name, like "GA4 Configuration."
  5. Click inside the Tag Configuration box and select Google Analytics: GA4 Configuration from the list.
  6. Paste your Measurement ID into the designated field. Leave "Send a page view event when this configuration loads" checked.
  7. Next, click inside the Triggering box and select All Pages. This tells GTM to fire this tag on every single page of your website.
  8. Click Save. Finally, click the blue Submit button in the top right, give your changes a version name (e.g., "Install GA4"), and click Publish.

Option B: Installing the Tag Directly on Your Site (gtag.js)

If you don't use Google Tag Manager, you can add the tracking code directly to your site’s HTML. This method works for any website but requires a bit of confidence editing code files.

  1. In your GA4 web stream details page, find the "Installation instructions" section.
  2. Under "Install Manually," you’ll see a snippet of code. Copy the entire thing.
  3. You need to paste this code just after the opening <head> tag on every page of your website. If you're using a modern CMS or theme, there's usually a single file (like header.php in a classic WordPress theme) or a theme options setting where you can add scripts to the header globally.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Option C: Using a Website Platform Integration

Most popular website builders have built-in support for Google Analytics, making the process much simpler.

  • WordPress: While you can add the tag code manually, it’s much easier to use a dedicated plugin. Plugins like MonsterInsights, Site Kit by Google, or GA Google Analytics allow you to simply paste your Measurement ID into a field and they handle the code placement for you.
  • Shopify: Shopify has excellent native integration. Go to Online Store > Preferences in your Shopify admin. In the Google Analytics section, you'll see a box where you can paste your Google tag. Simply copy the entire gtag.js code snippet from Option B above and paste it here. Shopify manages the rest.
  • Squarespace and Wix: Look for settings panel labeled "External API Keys" (Squarespace) or "Marketing Integrations" (Wix). These platforms provide a dedicated field where you just need to paste in your "G-" Measurement ID.

Finally, Verify Your GA4 Installation Is Working

After installing the tag, you want to make sure it’s working correctly. The easiest way is with GA4's own Realtime report.

  1. Keep your Google Analytics account open in one browser tab.
  2. In a different tab or on your phone, open your own website. Click around to a few different pages.
  3. In GA4, navigate to Reports > Realtime. Within about a minute, you should see yourself appear as a visitor on the map and in the charts.

If you see a visit recorded, congratulations! Your Google Analytics 4 setup is complete and correctly collecting data.

Final Thoughts

Setting up your GA4 property and installing the tracking tag on your website creates the foundation for your entire analytics strategy. Now that data is flowing in, you can start tracking user behavior, understanding which marketing channels are effective, and discovering how to improve your site's performance.

Of course, a proper setup is just the beginning, the real goal is to turn all that data into valuable insights. Often, the reporting interface inside GA4 can feel complex and time-consuming. At Graphed, we connect directly to your Google Analytics data and let you build reports and dashboards with simple, natural language. We help you skip the learning curve and get straight to the answers you need to grow your business, all in real time.

Related Articles