Switch to GA2
This commit is contained in:
parent
86357d2c38
commit
4ed413eaa7
18
docs/_templates/base.html
vendored
18
docs/_templates/base.html
vendored
@ -4,18 +4,14 @@
|
|||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
|
||||||
{%- if analytics_id %}
|
{%- if analytics_id %}
|
||||||
<script type="text/javascript">
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
var _gaq = _gaq || [];
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ analytics_id }}"></script>
|
||||||
_gaq.push(['_setAccount', '{{ analytics_id }}']);
|
<script>
|
||||||
_gaq.push(['_setDomainName', 'none']);
|
window.dataLayer = window.dataLayer || [];
|
||||||
_gaq.push(['_setAllowLinker', true]);
|
function gtag(){dataLayer.push(arguments);}
|
||||||
_gaq.push(['_trackPageview']);
|
gtag('js', new Date());
|
||||||
|
|
||||||
(function() {
|
gtag('config', '{{ analytics_id }}');
|
||||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
|
|||||||
@ -92,7 +92,7 @@ def run_man(args: Any) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def run_html(args: Any) -> None:
|
def run_html(args: Any) -> None:
|
||||||
call('make FAIL_WARN=1 "OPTS=-D analytics_id=UA-20736318-2" dirhtml', cwd=docs_dir)
|
call('make FAIL_WARN=1 "OPTS=-D analytics_id=G-XTJK3R7GF2" dirhtml', cwd=docs_dir)
|
||||||
add_old_redirects('docs/_build/dirhtml')
|
add_old_redirects('docs/_build/dirhtml')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user