Configuration and remove google analytics extension by modern method in layout html
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{% extends "!layout.html" %}
|
||||
|
||||
{% block extrahead %}
|
||||
{{ super() }}
|
||||
<!-- Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ googleanalytics_id }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ googleanalytics_id }}');
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user