Google Analytics Integration
The Google Analytics integration lets you connect your Hyperdocs documentation site to a Google Analytics property so you can track visitor traffic directly in your own Google Analytics account. Once connected, Google Analytics collects data independently alongside Hyperdocs' built-in Page Analytics, giving you access to the full Google Analytics reporting suite for your docs site.
Plan Requirements and Prerequisites
Before you can connect Google Analytics, the following must be in place:
β’Paid plan β the Google Analytics integration is available on Starter and above. The Free plan does not include it. If your workspace is on the Free plan, clicking Save opens an upgrade prompt.
β’Custom domain connected β analytics and integrations only activate once your docs are served from a custom sub-domain or sub-folder of your own domain. If no custom domain is connected, a banner at the top of the App Integrations page will prompt you to set one up first.
β’Admin role β only Admins can connect or change integrations. Editors and Viewers can see the card but cannot interact with it.
β’A Google Analytics property β you need an existing GA4 property (e.g. `G-XXXXXXXXXX`) or a Universal Analytics property (e.g. `UA-XXXXXXXX-X`) from your Google Analytics account.
How It Works
When a valid Google Analytics ID is saved, Hyperdocs embeds the tracking code on your published documentation site. Google Analytics then collects page view and visitor data directly from your site and makes it available in your Google Analytics dashboard. This is separate from Hyperdocs' own built-in Page Analytics β both can run at the same time.
Connecting Google Analytics
β’Open your admin dashboard and go to Settings β App Integrations.
β’Find the Google Analytics card and click the card header to expand it.
β’Enter your Google Analytics ID in the field provided. Accepted formats are `G-XXXXXXXXXX` (GA4) or `UA-XXXXXXXX-X` (Universal Analytics).
β’Click Save. Hyperdocs validates the ID format before saving β if the format is incorrect, an inline error message appears below the field and the save is blocked until you correct it.
β’Once saved, the card updates to show a connected status. Your published documentation site will now send traffic data to the linked Google Analytics property.
Updating or Removing the Integration
You can update or remove your Google Analytics ID at any time from the same card.
β’To update the ID, open the Google Analytics card, clear the existing value, enter the new ID, and click Save.
β’To remove the integration, clear the Google Analytics ID field entirely and click Save. The card returns to a disconnected state and tracking stops on your published site.
β’The Save button is only active when you have made a change to the field β it is disabled when the current value matches what is already saved.
Connection States
The Google Analytics card reflects the current state of the integration at all times:
β’Loading β the card is fetching the current saved settings on page load.
β’Disconnected β no Google Analytics ID is saved. The field is empty and the card header shows no connected indicator.
β’Connected β a valid ID has been saved. The card header shows a connected indicator and tracking is active on your published site.
The field accepts two formats. Entering anything else triggers an inline validation error and blocks the save.
β’GA4 property ID β starts with `G-` followed by alphanumeric characters, for example `G-XXXXXXXXXX`. This is the current Google Analytics format.
β’Universal Analytics property ID β starts with `UA-` followed by digits and a tracking number, for example `UA-XXXXXXXX-X`. This is the legacy Google Analytics format.
Plan Restriction
If your workspace is on the Free plan or does not yet have a custom domain connected, clicking Save opens a prompt explaining what is needed to proceed. The field and button remain visible on all plans β the prompt explains the requirement and offers a path to resolve it. Upgrading your plan or connecting a custom domain resolves the restriction immediately.