GTM Changes using Overrides

pull/170/head
Sam Dulam 2021-06-28 14:10:10 +12:00
parent 277208f700
commit 34d8ebe93e
2 changed files with 12 additions and 1 deletions

View File

@ -320,6 +320,7 @@ theme:
logo: assets/logo.png
favicon: assets/icon.webp
name: material
custom_dir: overrides
palette:
primary: light-blue
repo_name: portainer/portainer
@ -354,7 +355,7 @@ plugins:
extra:
analytics:
provider: google
property: G-PT7RWG2W49
property: GTM-TTJQ5VG
social:
- icon: fontawesome/brands/twitter
link: https://twitter.com/portainerio

10
overrides/main.html Normal file
View File

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block analytics %}
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TTJQ5VG');</script>
<!-- End Google Tag Manager -->
{% endblock %}