From 34d8ebe93eb3ce990344619c94f81afc60135432 Mon Sep 17 00:00:00 2001 From: Sam Dulam <Sam.Dulam@portainer.io> Date: Mon, 28 Jun 2021 14:10:10 +1200 Subject: [PATCH] GTM Changes using Overrides --- mkdocs.yml | 3 ++- overrides/main.html | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 overrides/main.html diff --git a/mkdocs.yml b/mkdocs.yml index 24edc8c..4212590 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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 diff --git a/overrides/main.html b/overrides/main.html new file mode 100644 index 0000000..57dc9d9 --- /dev/null +++ b/overrides/main.html @@ -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 %} \ No newline at end of file