Skip to content

Commit 938ac64

Browse files
committed
Rm sphinxcontrib.googleanalytics; override layout.html
1 parent 9dcbb7e commit 938ac64

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ include docs/_static/copybutton.js
2020
include docs/_static/css/custom.css
2121
include docs/_static/favicon.ico
2222
include docs/_static/sidebar.js
23+
include docs/_templates/layout.html
2324
include docs/conf.py
2425
include docs/index.rst
2526
include docs/make.bat

docs/_templates/layout.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% extends "!layout.html" %}
2+
{% block extrahead %}
3+
{{ super() }}
4+
<!-- Google tag (gtag.js) -->
5+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-G7374TFB11"></script>
6+
<script>
7+
window.dataLayer = window.dataLayer || [];
8+
function gtag(){dataLayer.push(arguments);}
9+
gtag('js', new Date());
10+
gtag('config', 'G-G7374TFB11');
11+
</script>
12+
{% endblock %}

docs/conf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def get_version():
6363
'sphinx.ext.imgmath',
6464
'sphinx.ext.viewcode',
6565
'sphinx.ext.intersphinx',
66-
'sphinxcontrib.googleanalytics',
6766
]
6867

6968
# Add any paths that contain templates here, relative to this directory.
@@ -376,6 +375,3 @@ def get_version():
376375
'https://media.readthedocs.org/css/readthedocs-doc-embed.css',
377376
'css/custom.css',
378377
]
379-
380-
googleanalytics_id = "G-G7374TFB11"
381-
googleanalytics_enabled = True

0 commit comments

Comments
 (0)