Skip to content

Commit

Permalink
Add Google Analytics tracking to docs.locust.io
Browse files Browse the repository at this point in the history
Done using sphinxcontrib.googleanalytics Sphinx extension.
  • Loading branch information
heyman committed Oct 21, 2024
1 parent b918971 commit e14f264
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def save_locust_env_variables():
"sphinx.ext.viewcode",
"sphinx_search.extension",
"sphinx_rtd_theme",
"sphinxcontrib.googleanalytics",
]

# autoclass options
Expand Down Expand Up @@ -161,6 +162,9 @@ def save_locust_env_variables():
html_static_path = ["_static"]
html_css_files = ["_static/theme-overrides.css", "_static/css/rtd_sphinx_search.min.css"]

# Google Analytics ID
googleanalytics_id = "G-MCG99XYF9M"
googleanalytics_enabled = True

# HTML theme
# html_theme = "haiku"
Expand Down
16 changes: 15 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ sphinxcontrib-htmlhelp = "2.0.1"
sphinxcontrib-jsmath = "1.0.1"
sphinxcontrib-qthelp = "1.0.3"
sphinxcontrib-serializinghtml = "1.1.10"
sphinxcontrib-googleanalytics = ">=0.4"

[tool.poetry.scripts]
locust = "locust.main:main"
Expand Down

0 comments on commit e14f264

Please sign in to comment.