How to set up web analytics tracking
This feature is available on these plans: ✔️ Growing ✔️ Scaling ✔️ Enterprise
With Scaling or Enterprise plans, you can add Custom Code in the form of JavaScript.
This feature allows for integration with many web analytics tools since they are working by loading a JS snippet.
If you decide to use Google Analytics, here is what you need to do.
Universal Analytics (Google Analytics 3) will disappear, and Google Analytics 4 is the next-generation measurement solution, replacing Universal Analytics. On July 1, 2023, standard Universal Analytics properties will stop processing new hits. If you still rely on Universal Analytics, we recommend that you prepare to use Google Analytics 4 going forward.
To add the Google Analytics tracking code to your documentation portal, you’ll need a piece of code known as the “Global Site Tag.”
You can find this in your Google Analytics admin dashboard. Locate the tracking code under Admin -> Data Streams -> Web stream details.
Copy the global site tag below into the Custom JavaScript field under Space Settings -> Custom Code.

Make sure you add the <head> tag in the section, and you replace the insert measurement ID with your own ID.
After the code is added, click Save and publish to production.
For security reasons, custom code is only included on a custom domain.