diff options
author | Daniil Baturin <daniil@baturin.org> | 2023-04-29 21:33:32 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2023-05-03 11:21:55 +0100 |
commit | 46a7d8c014a4ee48c187f27612fb9bec57c65cf2 (patch) | |
tree | 25308f2567930a061174f8b0567844d1ad555986 | |
parent | cfd7f171978ab245126e241dddd14a106287e7ad (diff) | |
download | community.vyos.net-46a7d8c014a4ee48c187f27612fb9bec57c65cf2.tar.gz community.vyos.net-46a7d8c014a4ee48c187f27612fb9bec57c65cf2.zip |
Add Google Tag Manager code
-rw-r--r-- | soupault.toml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/soupault.toml b/soupault.toml index ec9e6ac..d72bb6b 100644 --- a/soupault.toml +++ b/soupault.toml @@ -48,6 +48,31 @@ file = "templates/trustpilot.html" selector = "#trustpilot-widget" +[widgets.insert-google-tag-manager-head] + widget = "insert_html" + html = """ +<!-- Google Tag Manager --> +<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-5Q572R5');</script> +<!-- End Google Tag Manager --> +""" + selector = "head" + action = "prepend_child" + +[widgets.insert-google-tag-manager-body] + widget = "insert_html" + selector = "body" + html = """ +<!-- Google Tag Manager (noscript) --> +<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5Q572R5" +height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> +<!-- End Google Tag Manager (noscript) --> + """ + action = "prepend_child" + # Inserts a scary warning banner in preview versions [widgets.insert-staging-warning] widget = "include" |