Google Analytics
Google Analytics (GA4) shows you how many visitors come to the site, from where, which pages they view and how long they stay. Connecting it is simple — you only need the Measurement ID from your Google Analytics account.
Where it is configured
On the dashboard, in the sidebar, click Google Analytics (/admin/google-analytics). At the top is a status indicator, below it instructions on how to get the ID, then the input field.
Step by step
- Open Google Analytics in the settings.
- In analytics.google.com go to Admin → Data Streams, choose the web stream and copy the Measurement ID (it starts with
G-). - Paste the ID into the Measurement ID field (e.g.
G-XXXXXXXXXX). - Click Save Settings.
- The status changes to Analytics is active (green) and a Remove button appears.
Status and validation
| Status | Meaning |
|---|---|
| Not configured (red) | No ID entered — tracking is off. |
| Analytics is active (green) | The ID is saved — tracking works on public pages. |
The ID must start with G-. If the field is empty or the format is wrong, a warning is shown and the setting is not saved.
Note: When active,
gtag.js(GA4) is automatically inserted into all public pages of the site — never into the admin panel and never into the preview. It loads asynchronously so it does not slow the site down.
Removing
The Remove button works in two clicks: the first click asks for confirmation (the button turns orange "Click again" and resets after 5 seconds), and a second click within that time deletes the ID. Tracking is thereby removed from the public pages.
Link with cookies
If you use the Cookie consent banner (Privacy section), you can make loading Google Analytics conditional on the visitor's consent — the script loads only once the visitor accepts analytics cookies. That way you meet GDPR requirements.
Frequently asked questions
Where do I find the Measurement ID?
In Google Analytics: Admin → Data Streams → (your web stream) → Measurement ID. It always starts with G-.
Why don't I see data right away?
Google Analytics needs up to 24–48 hours to start showing full reports. The Realtime report works right after the first visit.
Is analytics recorded for me too while I edit the site?
No. The script is not inserted into the admin panel or the preview — only real visits to public pages are measured.