How to Set Up Google Analytics 4 (GA4) for Your Website or App
- Anchal

- Feb 3
- 3 min read
Google Analytics 4 (GA4) is Google’s modern analytics platform designed to track user behavior across websites and mobile apps. Unlike older versions, GA4 uses an event-based data model, allowing businesses to measure interactions such as clicks, scrolls, purchases, and form submissions in a more flexible and privacy-focused way.
Setting up GA4 properly ensures your data is accurate, structured, and ready for performance analysis, conversion tracking, and marketing optimisation.
Step 1: Create or Access Your Google Analytics Account
If you’re new to Google Analytics, begin by creating an account at analytics.google.com and clicking Start Measuring.
During this stage, you will:
Enter your account name (usually your business name).
Configure data-sharing settings.
Decide how Google may use your analytics data for benchmarking and product improvements.
If you already have an Analytics account, simply go to the Admin panel and create a new GA4 property inside it.
A properly created account forms the foundation for all tracking and reporting.
Step 2: Create a GA4 Property
A GA4 property is the container where your website or app data will live.
To create one:
Navigate to Admin.
Click Create Property.
Enter the property name.
Select your reporting time zone.
Choose your business currency.
Provide business details such as industry category and size.

These settings ensure your reports align with your business operations and financial tracking.
Step 3: Set Up a Data Stream
Once your property is ready, you must connect it to a website or mobile app using a data stream.
You can choose:
Web stream (for websites)
iOS stream (for Apple apps)
Android stream (for Android apps)
Web Data Stream Setup
When creating a web stream:
Enter your website URL.
Provide a stream name.
Enable Enhanced Measurement.
Enhanced Measurement automatically tracks:
Page views
Scroll tracking
Outbound clicks
Site search
File downloads
Video engagement (basic)
This automatic tracking provides you with immediate insights without requiring custom configuration.
Step 4: Install the GA4 Tracking Tag
After creating the data stream, GA4 generates a Measurement ID.
You must install this tracking tag to start collecting data.
Option 1 – Install Manually
Copy the GA4 tracking code (gtag.js).
Paste it into the <head> section of every page on your website.
Publish your changes.
This method works well for simple or static websites.
Option 2 – Install Using Google Tag Manager (Recommended)
Open Google Tag Manager.
Create a new GA4 Configuration Tag.
Enter your Measurement ID.
Set the trigger to All Pages.
Publish the container.
Google Tag Manager allows better flexibility and easier event tracking management in the future.
Step 5: Verify Data Collection
Once installed, confirm that data is flowing correctly.
You can do this by:
Visiting your website.
Opening the Realtime Report in GA4.
Checking if your visit appears as an active user.
It may take a few minutes for data to show initially, but Realtime reporting helps you confirm your setup immediately.
Step 6: (Optional) Set Up App Tracking via Firebase
If you are tracking a mobile app, GA4 will guide you through creating or linking a Firebase project.
Firebase allows you to:
Track in-app events
Monitor user retention
Analyze app engagement
Measure in-app purchases
This integration ensures consistent measurement across both web and app environments.
What Happens After Setup?
Once your GA4 property is installed and verified, you can begin:
Creating custom events
Marking conversions
Building audiences
Analyzing traffic sources
Measuring campaign performance
Your GA4 property now becomes the central hub for performance measurement and marketing decision-making.

