Skip to content

Commit

Permalink
GTM Changes using Overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
samdulam committed Jun 28, 2021
1 parent 277208f commit 34d8ebe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions overrides/main.html
Original file line number Diff line number Diff line change
@@ -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 %}

0 comments on commit 34d8ebe

Please sign in to comment.