Repository navigation
Analytics is included in offline copies of the python documentation. #136194
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jul 2, 2025 (I’m also not sure where this should go.)
The markup comes from
Doc/tools/templates/layout.html:{% if enable_analytics %} <script defer data-domain="docs.python.org" src="https://analytics.python.org/js/script.outbound-links.js"></script> {% endif %}The doc is built by https://github.com/python/docsbuild-scripts/ which uses an
PYTHON_DOCS_ENABLE_ANALYTICSenvironment variable.Reacted by Stan Ulbrych and Weilin DuThen it should be moved there I think, as it should not set
PYTHON_DOCS_ENABLE_ANALYTICSfor such builds, unless they reuse the same one.Reacted by Weilin DuI wrote python/docsbuild-scripts#321.
btw I recently learned:
Did you know our script automatically disables itself when a site is opened on localhost (i.e., the address developers use when they are testing a website or app privately before it goes online)?
This ensures that visits from developers and testers are not counted as real traffic, and you can blindly trust the stats you see on your dashboard – without any manual settings or code-work.
https://fosstodon.org/@plausible/115650256539111737
https://plausible.io/docs/troubleshoot-integration#are-you-running-on-localhost
Reacted by Stan Ulbrychour script automatically disables itself when a site is opened on localhost
In that case, do we need to change the doc or not?
Not really, but let's do it to avoid any future confusion. Thanks all!
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsTodo
Bug report
Bug description:
Appears in the documentation available for download at https://docs.python.org/3/download.html (specifically the HTML downloads).
This issue is across like, 4 repositories and I have no idea which is the root cause, so I'm leaving it here since there is a Docs folder.
CPython versions tested on:
3.15
Operating systems tested on:
Linux