Setting up Google Analytics

Brienne Wong
Brienne Wong
  • Updated

This feature is available on all Enterprise plans. Want this and other premium features? Update your plan here.

Set up Google Analytics

As of December 2021, we support Google Analytics 4 (GA4) and Universal Analytics (UA) codes. You can find full guides from Google on setting up Universal Analytics (UA) and Google Analytics 4 (GA4)
On July 1, 2023, Universal Analytics will stop collecting data. Google Analytics 4(GA4) is replacing Universal Analytics. You can read Google's guide on migrating to Google Analytics 4 (GA4).

  1. Create a Google Analytics account
  2. Create a property

Find your tracking ID

Next, find your property's tracking ID in the Admin settings.

Property settings in Google Analytics

You're now ready to start receiving data from zeroheight.

Add Google Analytics to your styleguide

When in your styleguide, click Settings > Analytics and enter your Google Analytics property tracking ID, then press Save

You should start to see events in Google Analytics.

You will need a different tracking ID for each of your styleguides. This will enable you to track each styleguide individually.

Analytics section in the Styleguide Settings


What will be tracked?

These events will be tracked.

Who will be tracked?

  • Analytics will be tracked for viewers of the styleguide.
  • Analytics won't be tracked for editors when they are logged into zeroheight.
  • When an editor clicks Preview, the preview session will not trigger any metrics. If you want to test whether metrics are working, open the Share link in an incognito/private session.
  • In accordance with GDPR, viewers in the UK/EEA will only be tracked if they accept analytics cookies by clicking 'Allow all' in the cookie banner.

If your team doesn't use Google Analytics, try zeroheight analytics to gather feedback.

Was this article helpful?