From d5b9278d21486aeef5872b93ff69ee24469a3ca7 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 6 Feb 2025 12:07:47 -0800 Subject: [PATCH] RTD: Fix GA Integration GA was dropped from RTD in early Oct, 2024. This adds it again. --- docs/requirements.txt | 1 + docs/source/conf.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 9f3c2ba702..a23405e002 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -10,5 +10,6 @@ sphinx>=5.3,<7.2 sphinx-copybutton sphinx-design sphinx_rtd_theme>=1.1.1 +sphinxcontrib-googleanalytics sphinxcontrib-svg2pdfconverter sphinxcontrib.programoutput diff --git a/docs/source/conf.py b/docs/source/conf.py index af1253a139..553f0f5b9e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -41,6 +41,7 @@ 'breathe', 'sphinx_copybutton', 'sphinx_design', + 'sphinxcontrib.googleanalytics', 'sphinxcontrib.programoutput', 'sphinxcontrib.rsvgconverter', 'matplotlib.sphinxext.plot_directive'] @@ -48,6 +49,10 @@ if not on_rtd: extensions.append('sphinx.ext.githubpages') +# Google Analytics +googleanalytics_id = "G-3P1ZT3SQQ5" +googleanalytics_enabled = True + # breathe config breathe_projects = {'openPMD-api': '../xml'} breathe_default_project = 'openPMD-api'