Search code examples
read-the-docs

How can I check how often my readthedocs page was hit?


I'm hosting a project ob github and use Sphinx and RTD to automatically convert and display my docs at RTD.

How do I add a page hit counter to my RTD page?


Solution

  • You can use Google Analytics to monitor your RTD documentation.

    Here's the page in the RTD documentation:
    Enabling Google Analytics on your Project

    Quote from the link:

    Read the Docs has native support for Google Analytics. You can enable it by:

    • Going to Admin > Advanced Settings in your project.
    • Fill in the Analytics code heading with your Google Tracking ID (example UA-123456674-1)

    Once your documentation rebuilds it will include your Analytics tracking code and start sending data. Google Analytics usually takes 60 minutes, and sometimes can take up to a day before it starts reporting data.