How to Set Up Data Stream in Google Analytics

Cody Schneider8 min read

Switching to Google Analytics 4 means getting familiar with new concepts, and at the top of that list is the "data stream." It’s the foundational setting that allows GA4 to start collecting information from your website or app. This guide will walk you through exactly what a data stream is, how to set one up step-by-step, and how to verify that it’s working correctly.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

What Exactly is a Data Stream in GA4?

Think of a data stream as a pipeline. It’s the source from which data flows from your website or mobile app into your Google Analytics 4 property. For every site or app you want to track, you need to create a dedicated data stream. This is a key difference from Universal Analytics (the older version), which used "Views" to segment data.

In GA4, the structure is simplified:

  • Account: The highest level, usually representing your company.
  • Property: Lives within an Account and represents your business's online presence (e.g., your company website and associated apps).
  • Data Stream: Lives within a Property and is a specific source of data (e.g., your website, your iOS app, or your Android app).

You can have one or more data streams in a single property. For example, a business might have one property for their brand and three data streams under it: one for their website, one for their iPhone app, and one for their Android app. For this tutorial, we will focus on creating a Web data stream, which is the most common starting point for most businesses.

Step 1: Get Your Google Analytics Property Ready

Before you can set up a data stream, you need a GA4 property to house it. If you already have one, you can skip to the next section. If you're starting from scratch, here’s a quick rundown.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

How to Create a New GA4 Property

  1. Log in to your Google Analytics account.
  2. Click the Admin gear icon in the bottom-left corner.
  3. In the Property column, click the blue + Create Property button.
  4. Give your property a name (e.g., "My Business Website").
  5. Select your reporting time zone and currency. This is important for accurate reporting, so make sure they match your business operations.
  6. Click Next. Answer the optional questions about your business and click Create.

After you click create, GA4 will prompt you to set up your first data stream, which brings us perfectly to the main event.

Step 2: Create Your Web Data Stream

Once you have a property, it's time to build the pipeline for your website data. If you were just creating your property, you'll already be on the setup screen. If not, follow these steps to get there.

  1. Navigate to Admin Settings: In your GA4 interface, click the Admin gear icon at the bottom-left. Make sure the correct Account and Property are selected at the top.
  2. Locate Data Streams: In the Property column (the middle one), click on Data Streams.
  3. Add a New Stream: Click the blue Add stream button and select Web from the dropdown list.
  4. Configure Your Stream Details:
  5. Check Your Enhanced Measurement Settings: By default, GA4 has Enhanced measurement turned on. This is a powerful feature that automatically tracks common user actions without any extra setup. Keep this enabled! It tracks things like:
  6. Create the Stream: Click the Create stream button.

Once you click create, you'll see a "Web stream details" page. At the top right, you'll find your Measurement ID, which looks like G-XXXXXXXXXX. This unique ID is what connects your website to this specific data stream. Keep this ID handy for the next step.

Step 3: Install the Google Tag on Your Website

Creating the data stream is just the first half of the process. For GA4 to actually receive data, you need to add its tracking code - the Google tag (gtag.js) - to your website. You have three main ways to do this, ranging from simple to more robust.

Option 1: Add the Code Snippet Directly (Manual Installation)

This method involves copying the GA4 tracking code and pasting it directly into your website's HTML.

Best for: Simple, static websites or users who are comfortable editing their site's code directly.

  1. On your "Web stream details" page, look for the "Installation instructions" section and click View tag instructions.
  2. Under the "Install manually" tab, you'll find a JavaScript code snippet. Click the copy icon next to it.
  3. Paste this entire snippet into the <head> section of every page on your website. If you're using a website template or theme, you can often add this to a single header template file that applies to the entire site.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YOUR_MEASUREMENT_ID"></script>
<script>
  window.dataLayer = window.dataLayer || [],
  function gtag(){dataLayer.push(arguments),}
  gtag('js', new Date()),

  gtag('config', 'G-YOUR_MEASUREMENT_ID'),
</script>
GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Option 2: Use Your Platform's Built-in Integration (CMS or Website Builder)

Most popular website platforms (like WordPress, Shopify, Wix, and Squarespace) know their users need to install Google Analytics. They often have a simple field where you just paste your Measurement ID - no code editing required.

Best for: Most users on common platforms. It's the easiest and safest method.

Here’s the general process:

  1. Copy your Measurement ID (e.g., G-XXXXXXXXXX) from your GA4 data stream details page.
  2. Log in to your website platform’s admin dashboard.
  3. Find the section for settings, integrations, or marketing tools.
  4. Look for a field labeled "Google Analytics ID" or "GA4 Measurement ID."
  5. Paste your ID into the field and save your changes.
  6. Example for Shopify: Go to Online Store → Preferences. Paste your ID in the Google Analytics section.
  7. Example for WordPress: Many themes have a built-in spot for tracking codes in the theme settings. Alternatively, you can use a plugin like Google Site Kit which handles the connection securely and adds extra reporting features to your WordPress dashboard.

Option 3: Use Google Tag Manager (Recommended)

Google Tag Manager (GTM) is a free tool that acts as a container for all the third-party tracking codes (or "tags") on your site. Instead of adding multiple scripts directly to your website, you add GTM once, and then manage all your tags - like GA4, Facebook Pixel, Google Ads, etc. - from the GTM interface.

Best for: Anyone planning to use multiple analytics or marketing tools. It keeps your site code clean and makes future tag management much easier.

Here’s the basic setup:

  1. If you haven't already, sign up for a Google Tag Manager account and create a container for your website. Follow its instructions to add the GTM container code to your site. This is a one-time setup.
  2. Inside your GTM container, go to Tags and select New.
  3. Give your tag a descriptive name, like "GA4 - Configuration Tag".
  4. For the tag type, select Google Analytics > Google Analytics: GA4 Configuration.
  5. In the Measurement ID field, paste your GA4 Measurement ID (G-XXXXXXXXXX).
  6. Under Triggering, select the All Pages trigger. This tells GTM to run your GA4 tag on every single page of your website.
  7. Click Save.
  8. Finally, click the Submit button in the top right corner of your GTM workspace, and then Publish to make your tag live.

Your GA4 data stream is now set up and connected to your site!

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Step 4: Verify Everything is Working Correctly

How do you know if you did it right? The easiest way is to check GA4's Realtime report.

  1. Keep your GA4 dashboard open in one browser tab. Navigate to Reports > Realtime.
  2. In a different browser tab (or on your phone), visit your own website.
  3. Switch back to the Realtime report tab in Google Analytics. Within a minute or two, you should see yourself appear as a user on the map and in the card "View user snapshot."

If you see your visit, congratulations - you have successfully set up your data stream! If nothing shows up after a few minutes, double-check that you've correctly copied your Measurement ID and saved your changes on either your website platform or in GTM. Remember, while the Realtime report shows data almost instantly, your standard reports can take between 24 and 48 hours to fully populate.

Final Thoughts

Setting up a data stream is the critical first step to using Google Analytics 4. It acts as the bridge connecting your website to your GA4 property, enabling the flow of valuable user data. With tools like Enhanced Measurement, you’ll be collecting powerful insights right out of the box before you even begin creating custom events or reports.

Once you’re successfully collecting all this great data, the next challenge is to turn it into clear, actionable insights without getting overwhelmed. Instead of digging through dozens of GA4 reports to answer a simple question, we created a faster way. With my tool, Graphed, you simply connect your Google Analytics account and use plain English to ask questions and build dashboards. You can ask "How did my blog content perform last month?" or "Show me a chart of user engagement by traffic source," and get an answer in seconds, turning hours of analysis into a quick conversation.

Related Articles