Skip to content

Commit

Permalink
Enable Google Analytics using an extension (#1860)
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso authored Oct 19, 2024
1 parent effa516 commit d968a85
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sphinx >=7.0.0,<9.0.0
furo
myst-parser
sphinxcontrib-googleanalytics
14 changes: 14 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"myst_parser",
"sphinxcontrib.googleanalytics",
# Rez custom extension
'rez_sphinxext'
]
Expand Down Expand Up @@ -117,6 +118,19 @@

todo_emit_warnings = False

# -- Options for googleanalytics extension ----------------------------------
# https://github.com/sphinx-contrib/googleanalytics

# ReadTheDocs used to support Google Analytics natively. But they no more do
# since July 2024. See https://github.com/readthedocs/readthedocs.org/issues/9530#issuecomment-2233541583

if not os.environ.get("READTHEDOCS"):
# Don't activate if run locally
googleanalytics_enabled = False

# https://jira.linuxfoundation.org/plugins/servlet/desk/portal/2/IT-26436
googleanalytics_id = "G-G11PX36QZS"


# -- Custom -----------------------------------------------------------------

Expand Down

0 comments on commit d968a85

Please sign in to comment.