Google Analytics
Google Analytics 4 as the traffic provider
Section titled “Google Analytics 4 as the traffic provider”Flowcourier.Umbraco.GoogleAnalytics reads your GA4 property through the Google Analytics Data API and feeds the same Analytics section, document tab, PageSpeed / Search Console views, Copilot tools and AI Visibility that the Matomo provider does. It can be installed next to the Matomo provider; the section then reads one of them, chosen with Flowcourier:Analytics:Provider — see Running Matomo and Google Analytics together.
It uses a service account, the same one the Search Console feature uses, so a site that runs both configures one key. No Google login for editors, no Google SDK on the server, nothing stored.
-
Enable the APIs and create a service account
In the Google Cloud Console, pick (or create) a project and enable Google Analytics Data API. Enable Google Analytics Admin API as well: it is optional, but without it the status card cannot show the property’s name and the site URL has to be configured by hand.
Under IAM & Admin → Service accounts create a service account and add a JSON key. Download it — Google shows it once.
-
Give the account access to the property
In Google Analytics open Admin → Property → Property access management, add the service account’s e-mail (
…@…iam.gserviceaccount.com) and give it the Viewer role. Nothing more: the package only reads.While there, note the property id under Admin → Property details — a number such as
123456789. It is not theG-…measurement id shown on the data stream; the package refuses a measurement id and says so. -
Install the package
Terminal window dotnet add package Flowcourier.Umbraco.GoogleAnalytics --prereleaseThis installs
Flowcourier.Umbraco.Analytics.Coreas well. No composer, noProgram.cschanges: the packages self-register. -
Configure
{"Flowcourier": {"GoogleAnalytics": {"PropertyId": "123456789","SiteUrl": "https://www.example.com"},"Analytics": {"Google": {"ServiceAccountJsonPath": "/secrets/ga-service-account.json"}}}}Keep the key out of source control: a file path outside the web root, or
Flowcourier__Analytics__Google__ServiceAccountJsonwith the JSON as an environment variable.SiteUrlis the public base URL the pages are tracked under; when omitted the package reads the default URI of the property’s first web data stream (Admin API). Every setting is listed in Configuration. -
Restart and check
Settings → Flowcourier → Google Analytics shows the effective configuration and the service account’s e-mail — the one to add in step 2. The Analytics section and the document tab work as described in the quick start.
What the dashboards show on GA4
Section titled “What the dashboards show on GA4”Everything is a GA4 report over the selected range, in the property’s time zone. Sessions are shown as visits, totalUsers as users, and the previous period is asked for in the same request as the current one. The AI assistants channel does not exist in Google Analytics: sessions whose source is an assistant’s host (chatgpt.com, perplexity.ai, claude.ai, copilot.microsoft.com, gemini.google.com, …) are reported as AI assistants here rather than as referrals, on the Acquisition dashboard, on a page’s referrers and in the page flow’s channel filter.
The page flow (previous and following pages on the document tab) has no transitions report to read from in GA4. It is read off pageReferrer instead: the referrers of this page’s views are its previous pages, the views whose referrer is this page are its following pages, and a view that refers to itself is counted as a reload (“Returned to this page”). Arrivals from outside the site are grouped by channel — and the campaign channel keeps Google’s own group, so a home page fed by Performance Max shows “From Google Ads (Cross-network)” rather than a bare “From campaigns” (e-mail, display, affiliates and the rest are named the same way; the Campaigns filter still narrows to all of them). The Campaigns card — on the document tab for the page, on the Acquisition dashboard for the site — breaks campaign traffic down by campaign, ad group, keyword, search query and network, and a click on any row opens its detail (trend, engagement, key events, landing pages, devices). The four Google Ads views need the GA4 property linked to Google Ads; keyword and search query exist only for Search campaigns. See Campaigns.
What GA4 cannot answer
Section titled “What GA4 cannot answer”GA4’s API reports aggregates, never individual visits. These parts of the Matomo experience are absent or different on a Google Analytics site, and the views say so rather than showing zeros:
| Surface | On Google Analytics |
|---|---|
| Visitor journeys, the Visits dashboard, clicking a realtime row | Not available. |
| Realtime “latest visitors” table, the map, the “last seen” tag | Counts only. The map shades countries by active visitors instead of placing city bubbles; the pages list shows page titles (GA4 realtime has no page path). |
| Exit pages, exit rate, “left the site” in the flow | GA4 has no exit metric. |
| Outlinks, downloads, site search in the flow | Not in GA4’s report model. |
| The live count on a page before publishing | Not shown. |
| Time on page | Engaged time per view (userEngagementDuration ÷ screenPageViews). |
| Server time in the findings | Not measured by GA4. |
The Realtime window is at most 30 minutes on a standard property (RealtimeMinutes above that is clamped).
A full walk through the section costs roughly 40 API requests. The standard quota of a GA4 property is 200 000 tokens a day and 40 000 an hour, and the package caches every report (five minutes by default, fifteen seconds for Realtime) and shares one Google call between backoffice tabs asking for the same thing. When Google does refuse for quota, the dashboards say so and the package waits a minute before asking again. The remaining quota is written to the log at Debug level after each report, Warning under 10 %.
Troubleshooting
Section titled “Troubleshooting”- “… has no access to Google Analytics property …” — the service account is not a Viewer on that property (step 2), or the property id belongs to another property.
- “The Google Analytics API is not enabled …” — enable the Data API in the Cloud project that owns the service account (step 1).
- “… is a measurement id (G-…), not a property id” — use the numeric id from Admin → Property details.
- The document tab says “no visits recorded” for a page that has traffic — the tracked host does not match. Set
Flowcourier:GoogleAnalytics:SiteUrlto the exact public origin (with or withoutwww, as your site is tracked) or check the web data stream’s default URI. - Nothing for today — GA4 processes standard reports with a delay of hours; yesterday is the first complete day. Realtime is live.