Appearance
Google Analytics Runbook
Updated: 2026-07-06
Scope
This runbook covers public analytics for:
| Site | Repo | Runtime env |
|---|---|---|
book.designcorp.eu | /home/admin/workspace/BookDesignCorp | /opt/designcorp/book-designcorp/prod/shared/.env.local |
designcorp.eu | /home/admin/workspace/designcorp | /opt/designcorp/designcorp/prod/.env |
hub.designcorp.eu | /home/admin/workspace/hub | /opt/designcorp/hub/prod/.env |
Source Of Truth
Current GA4 web streams in account Design Corporation, property Design Corp - GA4:
| Site | GA4 Measurement ID | Web stream ID |
|---|---|---|
book.designcorp.eu | G-FYLFVL29ND | 15207835113 |
designcorp.eu | G-108T4DY842 | 4170263498 |
hub.designcorp.eu | G-6TXTDX5C3J | 15207821962 |
Cabinet Map
Use one GA4 property for the DesignCorp ecosystem, with one Web stream per site.
| Question | GA screen | How to read it |
|---|---|---|
| Which sites are connected? | Admin -> Data streams | One row per site: stream name, site URL, stream ID, recent traffic status |
| Is tracking live right now? | Reports -> Realtime overview | Check active users and the Views / Page title and screen name card |
| Which site is a page from? | Reports -> Engagement -> Pages and screens | Add or use dimension Stream name / Hostname when the table needs site separation |
| Where did visitors come from? | Reports -> Acquisition | Use Session source / medium, Default channel group, then compare/filter by Stream name |
| Which pages lead to action? | Reports -> Engagement -> Events | Watch generate_lead, submit_lead, telegram_click, email_click |
| Which events are business goals? | Admin -> Data display -> Events -> Key events | Mark lead/funnel events as key events after GA has received them |
Current UI state:
Reports snapshothas been initialized with theUser behaviortemplate.Realtime overviewhas confirmed page views for:book.designcorp.eudesigncorp.euhub.designcorp.eu
- Saved comparisons should use
Stream name(Название потока) with exact matching. GA may only show stream values after the stream has processed data in reports, so newly-created streams can appear in Realtime before they appear in the saved-comparison value picker.
Recommended saved comparisons:
| Name | Dimension | Match | Value |
|---|---|---|---|
Site - BookDesignCorp | Stream name | exactly matches | Book Design Corp - GA4 |
Site - DesignCorp | Stream name | exactly matches | Design Corp - GA4 |
Site - HubDesignCorp | Stream name | exactly matches | Hub Design Corp - GA4 |
Use the saved comparisons across reports when the question is "what happened on each site?" Use All Users only for total DesignCorp ecosystem traffic.
Use direct GA4 first:
bash
NEXT_PUBLIC_GA4_ID=G-XXXXXXXXXX
NEXT_PUBLIC_GTM_ID=Use GTM only when we intentionally manage tags/conversions inside Google Tag Manager:
bash
NEXT_PUBLIC_GA4_ID=
NEXT_PUBLIC_GTM_ID=GTM-XXXXXXXAvoid enabling direct GA4 and a GTM container that also fires GA4 page views for the same site. That creates duplicate sessions/events.
Current Code Contract
Each site has an analytics runtime that:
- Does not load tags on dev hosts or when IDs are empty/placeholders.
- Sets Google Consent Mode defaults before sending events.
- Shows a small consent prompt when a real tag ID is present and no stored choice exists.
- Sends route-level
page_viewmanually withsend_page_view: false. - Tracks
telegram_click,email_click, andoutbound_clickthrough delegated link clicks. - Excludes admin paths such as
/admin,/ru/admin,/ua/admin,/pl/admin,/it/admin.
Event Taxonomy
| Event | Purpose |
|---|---|
page_view | Manual page view for App Router route changes |
form_start | Visitor starts a lead form |
generate_lead | GA4-recommended lead conversion event |
submit_lead | Internal custom lead event kept for existing dashboards |
form_submit_success | Form success diagnostics |
form_submit_error | Form failure diagnostics |
telegram_click | Telegram funnel entry |
email_click | Email contact click |
outbound_click | External link click |
analytics_consent_update | Consent choice changed/stored |
Business Goals
Use these events as business-facing goals:
| Priority | Event | Meaning | Key event status |
|---|---|---|---|
| P0 | generate_lead | Lead submitted through a site form | Mark as key event after first real lead event appears |
| P0 | telegram_click | Visitor entered the Telegram funnel | Mark as key event after first real Telegram click appears |
| P1 | submit_lead | Internal lead-submit tracking event | Keep for diagnostics or mark as key event only if generate_lead is missing |
| P1 | email_click | Visitor clicked email contact | Optional key event |
Do not generate fake lead submissions just to make events appear in GA. Use real traffic or a clearly-labeled test window, then annotate the date if a test lead is unavoidable.
Google Setup
- In Google Analytics, create or open a GA4 property.
- Create one Web data stream per production domain:
https://book.designcorp.euhttps://designcorp.euhttps://hub.designcorp.eu
- Copy each stream Measurement ID. GA4 Measurement IDs use the
G-...format. - Put the matching ID into the production env file for that site.
- Rebuild/redeploy the site through the normal CI/CD path.
- Open the production site, accept analytics, and verify events in Realtime/DebugView.
- Mark
generate_leadas a key event when lead tracking is confirmed. - Create saved comparisons for each stream using
Stream nameso normal reports can be split by site.
VNC Workflow
If Google login is required, open GA in the VNC browser and let the owner complete authentication. Do not ask for raw Google passwords or recovery codes in chat.
After login, the agent can read/copy:
- property name;
- web stream URL;
- Measurement ID;
- whether GTM is already installed for the same domain.
References
- Google: Consent Mode setup:
https://developers.google.com/tag-platform/security/guides/consent - Google: GA4 Measurement ID:
https://support.google.com/analytics/answer/12270356 - Google: Find Google tag ID / manual install:
https://support.google.com/analytics/answer/9539598 - Google: GA4 recommended events:
https://support.google.com/analytics/answer/9267735 - Google: Apply comparisons to reports:
https://support.google.com/analytics/answer/9269518