Skip to content

Commit b013fbc

Browse files
committed
add async to gtag script
1 parent 28be0ab commit b013fbc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

conf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ def get_version():
126126
# so a file named "default.css" will overwrite the builtin "default.css".
127127
html_static_path = ['_static']
128128

129+
html_css_files = [
130+
'css/rtd_theme_mods.css',
131+
]
132+
133+
129134
# HTML Favicon
130135
html_favicon = '_static/bridge.ico'
131136

@@ -259,8 +264,5 @@ def get_version():
259264

260265
def setup(app):
261266

262-
app.add_css_file('css/rtd_theme_mods.css')
263-
264-
265-
app.add_js_file('https://www.googletagmanager.com/gtag/js?id=G-K101Q1MWLM')
267+
app.add_js_file('https://www.googletagmanager.com/gtag/js?id=G-K101Q1MWLM', loading_method="async")
266268
app.add_js_file(None, body=GA_INVOKE_JS)

0 commit comments

Comments
 (0)