How to Add a Domain to Google Analytics
Adding your website to Google Analytics 4 is the first step toward understanding how visitors find and interact with your site. It’s a straightforward process that unlocks invaluable data about your audience and marketing efforts. This guide will walk you through creating a GA4 property, adding your domain as a data stream, and getting the tracking code installed on your site correctly.
Understanding GA4 Properties vs. Universal Analytics Views
Before we jump in, it’s helpful to know how Google Analytics 4 differs from its predecessor, Universal Analytics (UA). In Universal Analytics, you would add a "domain" to a "view" within a "property." In GA4, the structure is a bit simpler and more flexible.
You create a Property for your business or brand. Then, within that property, you set up one or more Data Streams. A data stream is simply a source of data, which could be:
- A website (your .com domain)
- An iOS app
- An Android app
This model allows you to track a user's entire journey across your website and apps within a single property, giving you a more complete picture of their behavior. For our purposes, we'll be creating a "Web" data stream to connect your website domain.
Step-by-Step: Adding Your Website Domain to GA4
Follow these steps to add your domain to a new Google Analytics 4 property. If you already have a GA4 property and just want to add another website, you can jump to step 3 to create a new, separate property for it or review the section on tracking multiple domains.
Step 1: Sign in to Google Analytics
First things first, head over to the Google Analytics homepage and sign in with your Google account. If you don’t have one, you’ll need to create one first.
Step 2: Navigate to the Admin Section
Once you’re logged in, look for the ‘Admin’ gear icon in the bottom-left corner of your screen. Click on it to access the settings for your account.
Step 3: Create a New Property
In the Admin section, you'll see two columns: ‘Account’ and ‘Property’. In the ‘Property’ column, click the blue + Create Property button.
This will start the property setup process, which involves a few simple forms:
- Property details: Give your property a name. Make it something clear and recognizable, like your website's name (e.g., “MyAwesomeWebsite.com”). You'll also set your reporting time zone and currency here. This ensures your data reports are aligned with your business operations.
- Business details: Select your industry category and business size. This information helps Google provide you with benchmarks and tailored reporting features.
- Business objectives: Choose the goals that are most important to your business, such as ‘Generate leads,’ ‘Drive online sales,’ or ‘Raise brand awareness’. This helps GA4 customize your reports and highlight the metrics that matter most to you from day one.
After filling this out, click ‘Create’.
Step 4: Set Up Your Web Data Stream
Now that you've created your property, Google will prompt you to set up your first data stream. Since you're adding a website, choose Web.
You’ll then be asked for two pieces of information:
- Website URL: Enter the primary domain of your website (e.g., myawesomewebsite.com). You don't need to include
https://as it's already selected. - Stream name: This is for your reference. It defaults to your website URL, which usually works perfectly fine.
You’ll also see a section for Enhanced measurement. It's highly recommended to leave this enabled. It automatically tracks important user interactions like scrolls, outbound clicks, site searches, and file downloads without you having to set up any extra code.
When you're ready, click Create stream.
Step 5: Get a Measurement ID and Installation Snippet
Once you create the stream, you'll be taken to the ‘Web stream details’ page. At the top right, you'll see your MEASUREMENT ID, which looks like G-XXXXXXXXXX. This unique ID connects your website to your GA4 data stream.
Next you need to add this to your website so GA4 can start collecting data. You have two main options for doing this.
Option A: Easiest - Install with a Website Builder Plugin or Theme
If your website is built on a platform like WordPress, Shopify, Squarespace, or Wix, this is the simplest method. Most of these platforms have a dedicated field for your Google Analytics ID.
- For WordPress: Many themes and dedicated SEO or analytics plugins (like Site Kit by Google, MonsterInsights, or Rank Math) have a field where you can paste your
G-Measurement ID. Just find the setting, paste the ID, and save your changes. - For Shopify: In your Shopify admin, go to Online Store > Preferences. You will find a section for Google Analytics where you can paste your Measurement ID.
- For Squarespace or Wix: Check their respective help centers, but both have settings areas under ‘Marketing Integrations’ or ‘Connect External Tools’ where you enter the Measurement ID.
This method is great because it automatically places the tracking code on every page of your site without you having to touch any code.
Option B: Recommended for Custom Websites - Install Manually
If you have a custom-built website or prefer to handle things manually, you'll need to add the GA4 tracking script (known as the Google tag or gtag.js) directly into your site’s code.
On the ‘Web stream details' page, find the ‘Install manually' tab and copy the entire code snippet provided. It will look something like this:
<!-- 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>You need to paste this code snippet immediately after the opening <head> tag on every page of your website. If your website uses a theme template, you can usually add it to the header template file (e.g., header.php in a basic WordPress theme) so it’s applied sitewide.
How to Verify Your Google Analytics Setup
After installing the tracking code, you’ll want to make sure it's working.
The easiest way to check is with the Realtime report in GA4. Here’s how:
- Open your website in a new browser tab or on your phone. Click around to a few different pages.
- In Google Analytics, navigate to Reports > Realtime.
Within a minute or two, you should see yourself as an active user on the map and in the "Users in Last 30 Minutes" chart. If you see activity, congratulations, your setup is correct! Don't be concerned if your standard reports are empty, those can take 24-48 hours to fully populate with data.
Tracking Multiple Websites in One GA Account
Many businesses and agencies manage more than one website. How you add them depends on your goals.
Separate Properties (Recommended for Unrelated Sites)
If you have two completely separate websites (e.g., one for a plumbing business and another for a SaaS product), you should create a new, separate property for each one. This keeps the data clean and avoids mixing audiences and goals. Simply follow the exact same steps outlined above for each new site you want to add.
Multiple Data Streams in a Single Property (Cross-Domain Tracking)
What if your business uses multiple domain names that are part of a single customer journey? For example, your marketing site is myproduct.com and your checkout happens on a separate platform like cart.myproduct.com.
In this case, you only want one GA4 property, because you're tracking a single customer journey across two domains. You can use a feature called cross-domain tracking.
To set this up, go to Admin > Data Streams, click your web stream, then go to Configure tag settings > Configure your domains. Here, you can add all the domains that should be treated as part of the same site. This tells GA4 not to count moving between myproduct.com and cart.myproduct.com as a new session from a new traffic source.
Final Thoughts
Setting up Google Analytics 4 is a critical first step towards data-driven marketing. Now that your domain is connected, you can start tracking site traffic, understanding user behavior, and measuring whether your campaigns are hitting their goals. Remember, check the Realtime report to confirm data is flowing and be patient as your other reports begin to populate.
Getting your data into GA4 is just the beginning, the real value comes from turning that data into actionable insights without spending all day inside complicated report builders. Tools like Graphed help you make sense of it all. We connect directly to your Google Analytics (plus marketing and sales platforms like Google Ads, Shopify, and Salesforce), allowing you to build dashboards and get answers just by asking questions in plain English. This lets you skip the learning curve and go straight to getting the insights you need to grow your business.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?