Screenshot of a Google Analytics dashboard displaying website performance metrics. The interface shows data from a specific date range with key metrics such as users, new users, sessions, engagement rate, average engagement time, and total revenue. A line graph at the top illustrates user trends over time. Below, there are bar graphs comparing traffic sources including organic search, direct, referral, and others. The left sidebar features navigation options like Reports, Explore, Advertising, and Admin. The interface uses a clean layout with a white background and blue accent colors.

How to Set Up Google Analytics (GA4) for Your Website (Updated 2025)

Disclaimer: This post includes an affiliate link. We may earn a small commission at no extra cost to you if you make a purchase through it. We only recommend valuable products and services.

If you’re running a website, understanding its performance is crucial for making informed business decisions. The premier tool for this is Google Analytics, and the latest version, GA4 (Google Analytics 4), offers a range of enhanced features. Whether you’re a small business owner, web developer, or digital marketer, setting up GA4 is the first step toward gaining valuable insights into your site’s traffic and user behavior.

In this guide, we’ll walk you through the steps of setting up GA4 on your website and how to make the most of its powerful new capabilities.

Why Google Analytics 4?

Before diving into the setup process, it’s important to understand why GA4 is the preferred choice for website analytics in 2025. GA4 is designed to collect data from both websites and mobile apps, providing a more comprehensive, user-centric view of all interactions.

GA4 has fully replaced Universal Analytics and continues to evolve with significant updates, including:

  • Event-based Tracking: GA4 tracks all user interactions as events, allowing you to track specific actions – from a button click to a video play – more effectively than the old pageview model.
  • Cross-platform Tracking: Whether you’re analyzing a website, a mobile app, or both, GA4 integrates all your data into a single platform for a unified view of the customer journey.
  • Enhanced Insights: GA4 comes with advanced machine learning features that can predict future trends, suggest data-driven actions, and provide automatically generated insights into user behavior.
  • Enhanced Consent Mode: As of 2025, GA4 offers improved tools to manage user consent dynamically, helping you comply with evolving data privacy regulations like GDPR.

Now that you understand the advantages of GA4, let’s dive into the setup process.


Step 1: Create a Google Analytics Account and Property

To get started, you’ll need a Google Analytics account. If you already have one, you’ll simply create a new property.

  1. Go to the Google Analytics Website: Visit analytics.google.com and sign in with your Google account.
  2. Create an Account: Click on “Start measuring” if you’re a new user. For existing users, click on the Admin gear icon in the lower-left corner and select Create Account.
  3. Set Up a Property: Once your account is created, you will be prompted to create a new GA4 property. Fill out the necessary details like your website’s name, industry, and time zone. When prompted, you will automatically be directed to set up a GA4 property.
  4. Create a Data Stream: After creating the property, you must create a data stream for your website. This is the source from which data will be collected. You’ll enter your website’s URL and give the stream a name.

Step 2: Add the Google Tag to Your Website

Once your GA4 property and data stream are set up, it’s time to add the tracking code to your website. This allows GA4 to start collecting data from your site.

  • For WordPress Users:
    • Using a Plugin: The easiest way to integrate GA4 is by using a plugin like Site Kit by Google or a dedicated analytics plugin. These tools allow you to connect your GA4 property by simply entering your Google Tag ID (the ID that starts with “G-“).
    • Manually Adding the Code: If you prefer manual installation, you can add the Google Tag directly to your site’s header.
      • Go to your GA4 property and click on the Admin gear icon.
      • Under the “Property” column, click on Data Streams.
      • Select your website’s data stream, then click on the View tag instructions link.
      • On the Install manually tab, copy the entire code snippet and paste it into the <head> section of your website’s HTML file.
      • For a more detailed explanation of this process, see our guide on How to Set Up Google Tag Manager for WordPress.
  • For Other CMS Platforms (Shopify, Wix, Squarespace, etc.):
    • Most popular website builders have a built-in field for analytics tracking. Simply find the “Analytics” or “Tracking” settings in your platform’s admin panel and paste your Google Tag ID into the designated field.

Step 3: Define Key Events (Conversions)

In GA4, the old concept of “Goals” is replaced by Key Events. A key event is a user action that you define as important to your business success. This allows you to measure how well your site is meeting its objectives.

Some common key events include:

  • Form Submissions: Tracking when a user submits a contact or lead form.
  • Product Purchases: Monitoring e-commerce transactions.
  • Sign-ups: Capturing email list sign-ups or membership registrations.

To set up key events in GA4:

  1. Go to your GA4 property and click on Events under the Configure section in the left-hand menu.
  2. If the event you want to track is already listed (e.g., form_submit), simply click the toggle to Mark as key event.
  3. If it’s a custom event, you can create it using Google Tag Manager. Once created, you can mark it as a key event in GA4.

Step 4: Use Google Tag Manager for Advanced Tracking

For advanced users and complex websites, Google Tag Manager (GTM) is an essential tool for managing all your website tags, including GA4. It allows you to add and update tags without changing your website’s code.

  1. Set Up Google Tag Manager: If you haven’t already, create a GTM account and add the GTM container code to your website.
  2. Create a New GA4 Tag: In your GTM workspace, create a new tag.
    • Select Tag Configuration and choose Google Analytics: GA4 Configuration.
    • Paste your Google Tag ID (the “G-” ID) into the tag configuration field.
    • Set the trigger to fire the tag on all pages (e.g., “All Pages” trigger).
  3. Publish the Tag: After previewing and testing your new tag using GTM’s built-in DebugView, publish it to make it live. This ensures all your tracking is managed from one central location.

Step 5: Analyze Your Data and Create Reports

Once GA4 is set up and collecting data, you can start using the platform’s reports to gain insights into your website’s performance.

Some of the most useful reports include:

  • Real-time Report: See how many users are currently on your site and which pages they’re viewing.
  • Acquisition Reports: Learn where your traffic is coming from (e.g., organic search, social media, paid ads).
  • Engagement Reports: Understand how users are interacting with your site. Key metrics like Engaged sessions and Average engagement time provide a more meaningful view than the old “bounce rate.”
  • Monetization Reports: If you have an online store, monitor product sales, revenue, and product performance.

You can customize reports in GA4 to focus on the metrics that matter most to your business. For deeper analysis, use the Explorations feature to create custom funnels, path reports, and segment user behavior.


One of the best features of GA4 is its seamless integration with other Google tools. Linking your GA4 property to other services helps you get a complete picture of your marketing efforts.

  • Link with Google Ads: This allows you to import your GA4 key events into Google Ads to track the performance of your paid campaigns and optimize your bidding strategies. To link, go to the Admin section in GA4 and select Product Linking, then choose Google Ads.
  • Link with Google Search Console: This integration provides insights into your site’s organic search traffic, including which keywords users are searching for to find your site.

Step 7: Use Insights for Business Growth

Finally, use the data you gain from GA4 to drive your business decisions. By understanding your traffic, user behavior, and key event rates, you can make data-driven decisions to improve your website and grow your business. For example, you can use the data to:

  • Optimize your most popular blog posts.
  • Improve the user experience on pages with high exit rates.
  • Launch more effective marketing campaigns.

Setting up Google Analytics (GA4) is a crucial step for anyone serious about tracking and analyzing website performance. With its powerful features and deep integrations, GA4 can help you make better business decisions and optimize your online presence. Remember, understanding your website’s data is key to success.

Need a professional to help you set up Google Analytics on your site? Get in touch with us for a personalized consultation.

Similar Posts