Google Analytics 4 (GA4) is the latest version of Google’s analytics platform, designed to provide deeper insights into user behavior across websites and apps. If you’re new to GA4 or transitioning from Universal Analytics, this step-by-step guide will walk you through the process of setting up GA4 for your website.

Step 1: Create a Google Analytics Account
- Go to analytics.google.com and sign in with your Google account.
- Click on the Admin gear icon in the bottom-left corner.
- In the Account column, click Create Account.
- Enter an account name (e.g., your business name).
- Configure data-sharing settings (optional) and click Next.
Step 2: Set Up a Property in GA4
- In the Property column, click Create Property.
- Enter a property name (e.g., your website name).
- Select your reporting time zone and currency.
- Click Next.
- Choose your industry category and business size.
- Select how you intend to use Google Analytics (e.g., for measuring customer engagement, generating leads, etc.).
- Click Create.
Step 3: Configure Your Data Stream
- After creating the property, you’ll be prompted to add a data stream.
- Select Web as the platform.
- Enter your website URL (e.g.,
https://www.yourwebsite.com
). - Provide a stream name (e.g., “Website Traffic”).
- Click Create Stream.
- Once the stream is created, note down your Measurement ID (starts with
G-
). You’ll need this for the next steps.
Step 4: Install the GA4 Tracking Code on Your Website
Option 1: Add the Global Site Tag Manually
- In the data stream details, scroll down to Tagging Instructions.
- Click on Global Site Tag (gtag.js).
- Copy the provided
gtag.js
code snippet. - Paste it into the
<head>
section of every page on your website, just before the closing</head>
tag.
Option 2: Use Google Tag Manager (Recommended)
- If you use Google Tag Manager, create a new tag in GTM.
- Select Google Analytics: GA4 Configuration as the tag type.
- Enter your Measurement ID.
- Set the trigger to All Pages.
- Save and publish your changes in GTM.
Step 5: Verify Your GA4 Setup
- Go to the Reports section in your GA4 dashboard.
- Click on Real-Time to see active users on your website.
- Visit your website in a new tab or ask someone else to visit it. You should see activity in the Real-Time report.
- Use the Google Tag Assistant Chrome extension to verify that the GA4 tag is firing correctly.
Step 6: Configure Key Settings in GA4
Set Up Goals and Conversions
- Go to Admin > Events.
- Click Create Event to track specific user actions (e.g., form submissions, button clicks).
- Mark important events as conversions by toggling the Mark as conversion switch.
Link Google Ads (Optional)
- If you use Google Ads, link your GA4 property to your Google Ads account for better campaign tracking.
Enable Enhanced Measurement
- In your data stream settings, enable Enhanced Measurement to automatically track page views, scrolls, outbound clicks, and more.
Step 7: Explore GA4 Reports
Overview Reports
- Check the Home and Reports sections for insights into user acquisition, engagement, and retention.
Custom Reports
- Use the Explore section to create custom reports and analyze data in-depth.
Audience Building
- Create audience segments based on user behavior to target specific groups in your marketing campaigns.
Step 8: Transition from Universal Analytics (If Applicable)
Set Up Dual Tagging
- If you’re still using Universal Analytics (UA), consider running both UA and GA4 simultaneously during the transition period.
Export Historical Data
- Export any historical data from UA that you want to retain, as GA4 does not import data from UA.
Step 9: Monitor and Optimize
- Regularly Review Data: Check your GA4 dashboard regularly to monitor traffic, conversions, and user behavior.
- Adjust Settings: Refine your goals, events, and audience segments based on your findings.
- Stay Updated: Keep an eye on new GA4 features and updates to make the most of the platform.
Additional Tips
- Test Your Setup: Use tools like Google Tag Assistant or GA Debugger to ensure your tracking code is working correctly.
- Train Your Team: Ensure your marketing team understands how to use GA4 and interpret its data.
- Stay Compliant: Make sure your tracking setup complies with data privacy regulations like GDPR or CCPA.