Where do I put my Google Analytics tracking ID?

The Google Analytics integration for GitBook allows you to track traffic in your published sites from your Google Analytics dashboard, giving you a fuller picture of how your customers interact across your sites and apps throughout their lifecycle.

Ensure the integration has been configured in each site you want to gather insights on.

You can input the tracking ID in two ways:

  • from the sidebar

  • from site settings

Add Google Analytics tracking ID from the sidebar

  1. Navigate to the Integrations tab in the sidebar.

  2. Access the Google Analytics integration from the list of installed integrations and click on the tab Configuration.

  3. Next, click Pick a site and choose where the integration should run.

  4. Click on the options menu next to the site name and select Configure in site.

  5. Add your UA-XXXXXXXXX-YGoogle Analytics tracking ID in the tracking ID field.

Once complete, your GitBook site should send data to your Google Analytics account. You can verify this by checking your Google Analytics dashboard for incoming data.

Please remember that the data might take some time (up to 48 hours) to appear in your Google Analytics dashboard.

Add Google Analytics tracking ID directly from the site

  1. In GitBook, navigate to the selected site where the tracking ID should be added.

  2. In the site, navigate to the integrations option in the top right-hand corner.

  3. In the list of available integrations, select Google Analytics and click on the settings icon next to it.

  4. Once in the configuration window, add the tracking ID (UA-XXXXXXXXX-Y) in the "tracking ID" field.

Once complete, your GitBook site should send data to your Google Analytics account. You can verify this by checking your Google Analytics dashboard for incoming data.

Please remember that the data might take some time (up to 48 hours) to appear in your Google Analytics dashboard.

Last updated