mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
Add support for GA4 gtag.js Google Analytics
This commit is contained in:
parent
fd70e764b4
commit
6e9f1e602e
1 changed files with 12 additions and 0 deletions
|
|
@ -16,6 +16,18 @@
|
|||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if GOOGLE_ANALYTICS_GTAG %}
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ GOOGLE_ANALYTICS_GTAG }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ GOOGLE_ANALYTICS_GTAG }}');
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if GAUGES %}
|
||||
<script>
|
||||
var _gauges = _gauges || [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue