We’re reader-supported — some links are affiliate links. Learn more →

Skip to content

Independent software research. Some links may earn us a commission at no extra cost to you. Learn more →

ICode

How to Set Up Google Analytics

Independent analysis. This page may contain affiliate links.

How to Set Up Google Analytics

Google Analytics 4 (GA4) is the current version of Google’s web and app analytics platform. It tracks traffic, engagement, and conversions across devices using an event-based model, and it replaced the older Universal Analytics.

Setting it up correctly the first time saves headaches later. This guide covers creating a property, installing the tracking tag, configuring events and conversions, connecting reports, and handling privacy basics.

Quick comparison table

ToolBest forStarting price
Google Analytics 4Web and app analyticsFree
Google Tag ManagerManaging tracking tags without code editsFree
Google Search ConsoleSearch queries and indexing dataFree
MatomoPrivacy-focused self-hosted analyticsFree; cloud from ~$19/mo
PlausibleLightweight privacy-friendly analyticsFrom ~$9/mo
FathomSimple privacy-first analyticsFrom ~$14/mo
Icode editorial illustration
Icode editorial illustration (image: icode.io.vn)

Create Your Account and Property

Sign in to Google Analytics and create an account, then a property for your website or app. Choose the correct reporting time zone and currency, since these cannot easily be changed later and affect how data is grouped.

GA4 uses a data stream for each platform. Add a web data stream for your site, and note the measurement ID it generates; you will need it for installation.

Install the Tracking Tag

The easiest route for most WordPress sites is a plugin such as Site Kit or a dedicated GA4 plugin. If you want flexibility, install Google Tag Manager and add the GA4 configuration tag there, so future tags can be added without editing code.

If you edit your theme directly, paste the Google tag into the head section of every page. Whatever method you choose, verify that data is arriving in the real-time report before moving on.

Configure Events and Conversions

GA4 measures interactions as events. Some events like page_view and scroll are collected automatically, while others such as form submissions, purchases, or sign-ups need to be set up. Use Google Tag Manager to fire these without developer help where possible.

Mark the events that matter to your business as conversions, such as a completed purchase or a contact form. Accurate conversion tracking is the foundation for judging which channels and campaigns actually drive results.

Icode editorial illustration
Icode editorial illustration (image: icode.io.vn)

Explore Reports and Connect Search Data

The reports area covers acquisition, engagement, monetization, and retention. Start with acquisition to see where visitors come from, then check engagement for how they interact. Link Google Search Console to see the queries that brought organic traffic.

Use Explorations to build custom reports by segment, such as traffic from a specific campaign. For deeper visualization, connect GA4 to Looker Studio and build dashboards for stakeholders.

Handle Privacy and Data Basics

GA4 includes controls for data retention, IP anonymization, and consent. If you serve users in regions with privacy laws, connect a consent management platform so analytics cookies respect user choices.

Document what you collect and why, and keep your privacy policy aligned. Even free analytics carry responsibilities, and getting consent right protects both your users and your business.

Pros

  • Free and integrates deeply with Google’s ecosystem
  • Event model works across web and apps
  • Connects to Search Console and Looker Studio
  • Scales from small sites to large ones
Icode editorial illustration
Icode editorial illustration (image: icode.io.vn)

Cons

  • Interface has a steeper learning curve than old analytics
  • Event setup requires some configuration
  • Data retention and sampling limits on the free tier

Frequently asked questions

Is Google Analytics free?

Yes, GA4 is free for standard use. A paid Analytics 360 tier exists for large enterprises with advanced needs.

Do I need Google Tag Manager?

Not strictly, but it makes adding and managing tags easier without editing site code each time. It is worth setting up if you plan multiple tracking tools.

How long does setup take?

Basic setup can be done in under an hour. Configuring custom events and conversions adds more time depending on how many you need.

Verdict

Setting up Google Analytics comes down to three steps done properly: create the property, install the tag, and configure the events and conversions that matter to your business. Verify data in real time, connect Search Console, and respect privacy rules. Get those basics right and GA4 becomes a reliable source of truth for marketing decisions.

Read more: analytics tools · checklist SEO.