Google Analytics is Google's analytics platform that measures how people reach and use a site or app. The current version, Google Analytics 4 (GA4), records everything as events, such as page views, clicks and purchases, rather than the session-and-pageview model of the older Universal Analytics.
Why it matters
It shows where visitors come from, which pages they use and which actions lead to conversions, so you can decide where to invest. Because it uses cookies and collects personal data, privacy laws such as the GDPR may require consent in some regions.
Define key events such as purchase or sign_up and mark them as key events so reports show business outcomes, not just page views.
Example
A page sends an event with a snippet like:
<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>
Common mistakes
- Counting internal team visits as real traffic.
- Skipping conversion event setup, leaving no business goals.
- Loading the tag before consent where consent is required.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.