Back to content

How to install Google Analytics on your website

A straightforward GA4 installation checklist for most websites, including verification.

Raphael Carvalho · Feb 04, 2026 · 5 min read

Quick Summary

  • A straightforward GA4 installation checklist for most websites, including verification.

This is a clean GA4 installation path for most sites. It assumes you want a direct install (not via GTM).

1. Create a GA4 property

  1. Go to Google Analytics.
  2. Create a new GA4 property.
  3. Add a Web data stream and copy the Measurement ID (format: G-XXXXXXX).

2. Install the GA4 tag

Place this in the <head> of every page:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXX');
</script>

3. Verify in Realtime

Open your website in a new tab, then go to Reports > Realtime in GA4. You should see your visit.

4. Track key events

For key actions (signup, purchase, lead), define events using gtag('event', ...) or Google Tag Manager.

5. Common issues

  • No data: Ad blockers can block GA4. Test in an incognito window.
  • Wrong property: Double check the Measurement ID.
  • Duplicate pageviews: Ensure only one GA4 tag is installed.

If you want a GA4 audit or a clean tracking plan, I can help.

GA4 Inspector

Audit events, parameters, and GA4 implementation quality.

See GA4 Inspector
Interactive SQL course

SQL do Zero ao Avançado

The interactive SQL platform built for analysts. Stop depending on the data engineering queue.

See the course

Advertisement: SQL do Zero ao Avançado

About the author

Raphael Carvalho

Founder & Principal Consultant

Share Twitter LinkedIn

Recommended Reading