sphinxcontrib-googleanalytics
Sphinx extension googleanalytics
What it is and what it does
sphinxcontrib-googleanalytics is a Sphinx extension that automatically injects Google Analytics tracking code into HTML documentation generated by Sphinx. It requires only Sphinx as a runtime dependency and integrates via a simple configuration entry in conf.py, where you supply your Google Analytics tracking ID.
The extension is designed for documentation authors who want to monitor how their generated HTML docs are being accessed and used. It operates at build time, adding tracking instrumentation to the final HTML output without requiring manual edits to individual pages.
Use it for:
- Track visitor traffic and engagement metrics for published Sphinx documentation sites.
- Monitor which documentation pages are most frequently accessed by users.
- Gather analytics on documentation usage to inform content prioritization and updates.
- Measure the reach and adoption of technical documentation across teams or projects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds Google Analytics tracking to Sphinx-generated HTML documentation by injecting tracking code into built pages.
Yes, if you maintain Sphinx documentation and want built-in Google Analytics integration without manual HTML editing. The low install friction and permissive license make it a straightforward addition. However, verify compatibility with your current Google Analytics setup (GA4 vs. legacy), and note that the package is aging—last updated 445 days ago—so check whether it still works with recent Sphinx versions before committing to production use.
Install
sphinxcontrib-googleanalytics on PyPI
pip
pip install sphinxcontrib-googleanalyticsuv
uv add sphinxcontrib-googleanalyticspoetry
poetry add sphinxcontrib-googleanalyticsInstalling sphinxcontrib-googleanalytics
Before you install
Low install friction; single wheel dependency on Sphinx. Maintenance status is aging—last release was 445 days ago, though the repository remains active and not archived.
License in practice
BSD-3-Clause permissive license; you may use, modify, and distribute this package freely in commercial or private projects provided you retain the license notice.
Quickstart
pip install sphinxcontrib-googleanalytics
In conf.py:
extensions = ['sphinxcontrib.googleanalytics']
googleanalytics_id = 'UA-123-123-123'
Verify before relying
- Whether the package works with current Google Analytics tracking implementations (GA4 vs. legacy Universal Analytics)
- Python version compatibility, as requires_python is unspecified in the fact sheet
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — Sphinx |
| Maintenance | aging — 445 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,134/month — #13,102 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinxcontrib_googleanalytics-0.5-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
sphinx-commentsIntegrates third-party commenting and…
permissive · top 15,000 on PyPI
sphinx-reredirectsSphinx extension that generates HTML redirect…
unclear · top 5,000 on PyPI
sphinx-markdown-builderA Sphinx extension that generates Markdown…
permissive · top 15,000 on PyPI
sphinxcontrib-openapiSphinx extension that renders OpenAPI (Swagger)…
permissive · top 15,000 on PyPI
sphinx-jinjaA Sphinx extension that lets you embed Jinja2…
permissive · top 5,000 on PyPI
sphinx-last-updated-by-gitA Sphinx extension that automatically extracts…
permissive · top 15,000 on PyPI
sphinx-faviconA Sphinx extension that injects custom favicon…
permissive · top 15,000 on PyPI
sphinx-gallerySphinx-Gallery is a Sphinx extension that…
permissive · top 15,000 on PyPI
sphinxcontrib-djangoA Sphinx extension that enhances autodoc output…
permissive · top 15,000 on PyPI
django-analyticalIntegrates multiple third-party analytics…
permissive · top 15,000 on PyPI