Google Analytics is a free web analytics tool from Google that measures how many visitors your website has, where they come from, which pages they view and how they behave. It is the most widely used analytics tool in the world.
How does Google Analytics work?
Google Analytics collects data via a small piece of JavaScript code (tracking code) that you place on your website. This code records information with every page visit, such as:
- Traffic sources β do visitors arrive via Google, social media, direct traffic or a link?
- Page views β which pages are viewed most?
- Session duration β how long do visitors stay on your site?
- Devices β do people visit your site on desktop, tablet or mobile?
- Conversions β how many visitors complete a desired action (purchase, form submission)?
Google Analytics 4 (GA4)
Since 2023, Google Analytics 4 has been the standard version. GA4 differs from the previous version (Universal Analytics) in several ways:
- Event-based β everything is an event, not just page views.
- Cross-platform β measures visitors across website and app.
- Privacy-focused β works better with cookieless tracking and GDPR regulations.
- Machine learning β predicts trends and fills in missing data.
Google Analytics and WordPress
You can connect Google Analytics to your WordPress website in several ways:
- Google Tag Manager β the recommended method for flexible tag management.
- Plugin β plugins such as Site Kit or MonsterInsights make the connection straightforward.
- Manual β placing the tracking code directly in your themeβs header.
The data from Google Analytics helps you improve your SEO strategy: you can see which pages perform well, where visitors drop off and which search terms drive traffic (in combination with Google Search Console).