diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-03 01:18:23 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-07 18:22:52 +0300 |
| commit | 6179b066e69514f714c883df423a441621ee0013 (patch) | |
| tree | 998fba669b2be029435b7f8066297575becaa40c /docs/_templates/layout.html | |
| parent | 4eaf1e11aabb09afc11b26b90ad0ab8c8aed5d58 (diff) | |
| download | vyos-documentation-6179b066e69514f714c883df423a441621ee0013.tar.gz vyos-documentation-6179b066e69514f714c883df423a441621ee0013.zip | |
feat(docs): add Cookiebot CMP and GTM with Consent Mode v2
Inject Cookiebot CMP, Google Consent Mode v2 defaults, and Google Tag
Manager into the Sphinx layout. Cookiebot loads first so its
auto-blocker can scan and block other tags before they execute;
Consent Mode v2 starts denied for all categories except security_storage
and updates only after Cookiebot fires the consent update.
🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to 'docs/_templates/layout.html')
| -rw-r--r-- | docs/_templates/layout.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 5736a26f..cfc59dca 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,6 +1,37 @@ {% extends "!layout.html" %} {%- set current_version = "1.5.x circinus" %} {% block extrahead %} + {# Cookiebot CMP — must load first so its auto-blocker can scan/block other tags #} + <script id="Cookiebot" + src="https://consent.cookiebot.com/uc.js" + data-cbid="932cb8b9-5141-4dc9-9018-21fc31a0586f" + data-blockingmode="auto" + type="text/javascript"></script> + + {# Google Consent Mode v2 defaults — deny everything until Cookiebot fires the update #} + <script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('consent', 'default', { + 'ad_storage': 'denied', + 'ad_user_data': 'denied', + 'ad_personalization': 'denied', + 'analytics_storage': 'denied', + 'functionality_storage': 'denied', + 'personalization_storage':'denied', + 'security_storage': 'granted', + 'wait_for_update': 500 + }); + gtag('set', 'ads_data_redaction', true); + </script> + + {# 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-T5VQHRT');</script> + <style>#vyos-header-iframe{position:fixed;top:0;left:0;right:0;z-index:999999999;width:100%;border:none}</style> <style>#vyos-footer-iframe{width:100%;border:none}</style> <iframe src='https://vyos.io/iframes/header' id='vyos-header-iframe'></iframe> @@ -30,3 +61,10 @@ <script type="text/javascript" charset="utf8" src="{{ pathto("_static/js/footer.js", True) }}"></script> </script> {% endblock %} + +{% block body %} + {# GTM noscript fallback #} + <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T5VQHRT" + height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> + {{ super() }} +{% endblock %} |
