From 6179b066e69514f714c883df423a441621ee0013 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Sun, 3 May 2026 01:18:23 +0300 Subject: feat(docs): add Cookiebot CMP and GTM with Consent Mode v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- docs/_templates/layout.html | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'docs/_templates/layout.html') 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 #} + + + {# Google Consent Mode v2 defaults — deny everything until Cookiebot fires the update #} + + + {# Google Tag Manager #} + + @@ -30,3 +61,10 @@ {% endblock %} + +{% block body %} + {# GTM noscript fallback #} + + {{ super() }} +{% endblock %} -- cgit v1.2.3 From f34f1d66b760d6616080ca07ad1b403cf75338bb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 13:42:08 +0000 Subject: fix(docs): deduplicate GTM ID via Jinja var and use window.dataLayer in gtag() Agent-Logs-Url: https://github.com/vyos/vyos-documentation/sessions/f6d95cc7-cdbe-4d76-8077-f7fae5e9ddf2 Co-authored-by: andamasov <12631358+andamasov@users.noreply.github.com> --- docs/_templates/layout.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/_templates/layout.html') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index cfc59dca..8c57a066 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,5 +1,6 @@ {% extends "!layout.html" %} {%- set current_version = "1.5.x circinus" %} +{%- set gtm_id = "GTM-T5VQHRT" %} {% block extrahead %} {# Cookiebot CMP — must load first so its auto-blocker can scan/block other tags #} + })(window,document,'script','dataLayer','{{ gtm_id }}'); @@ -64,7 +65,7 @@ {% block body %} {# GTM noscript fallback #} - {{ super() }} {% endblock %} -- cgit v1.2.3 From 52f78b43576615f686d161e91721c1a818685077 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Thu, 7 May 2026 17:17:08 +0300 Subject: fix(docs): remove stray and add title to GTM noscript iframe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated by [robots](https://vyos.io) --- docs/_templates/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/_templates/layout.html') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 8c57a066..5116899f 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -60,12 +60,12 @@ - {% endblock %} {% block body %} {# GTM noscript fallback #} + height="0" width="0" style="display:none;visibility:hidden" + title="Google Tag Manager"> {{ super() }} {% endblock %} -- cgit v1.2.3 From 4d8581c0e709848a601384addf3026fb405345fc Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Thu, 7 May 2026 17:19:41 +0300 Subject: feat(docs): read GTM_ID from environment instead of hardcoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the Google Tag Manager container ID out of the template and into conf.py via os.environ.get('GTM_ID', ''), exposed to Jinja via html_context. Set GTM_ID in the RTD project environment variables. 🤖 Generated by [robots](https://vyos.io) --- docs/_templates/layout.html | 1 - docs/conf.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/_templates/layout.html') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 5116899f..cf25c15d 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,6 +1,5 @@ {% extends "!layout.html" %} {%- set current_version = "1.5.x circinus" %} -{%- set gtm_id = "GTM-T5VQHRT" %} {% block extrahead %} {# Cookiebot CMP — must load first so its auto-blocker can scan/block other tags #} + {% endif %} @@ -62,9 +64,10 @@ {% endblock %} {% block body %} - {# GTM noscript fallback #} + {% if gtm_id %} + {% endif %} {{ super() }} {% endblock %} -- cgit v1.2.3 From 53eda167df8f0f983ee34fd33e90524dcecb08de Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Thu, 7 May 2026 17:53:34 +0300 Subject: feat(docs): move Cookiebot CBID to COOKIEBOT_ID env var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Read COOKIEBOT_ID from the environment via conf.py html_context, replacing the hardcoded data-cbid value in layout.html. Guards tightened to {% if gtm_id and cookiebot_id %} so neither GTM nor Cookiebot loads unless both IDs are present. 🤖 Generated by [robots](https://vyos.io) --- docs/_templates/layout.html | 6 +++--- docs/conf.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/_templates/layout.html') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 2521026b..464e73f8 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,11 +1,11 @@ {% extends "!layout.html" %} {%- set current_version = "1.5.x circinus" %} {% block extrahead %} - {% if gtm_id %} + {% if gtm_id and cookiebot_id %} {# Cookiebot CMP — must load first so its auto-blocker can scan/block other tags #} @@ -64,7 +64,7 @@ {% endblock %} {% block body %} - {% if gtm_id %} + {% if gtm_id and cookiebot_id %} diff --git a/docs/conf.py b/docs/conf.py index 74ad1ff6..083482a8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -148,6 +148,7 @@ html_context = { 'github_version': _github_version, 'conf_py_path': '/docs/', 'gtm_id': os.environ.get('GTM_ID', ''), + 'cookiebot_id': os.environ.get('COOKIEBOT_ID', ''), } # sphinx-sitemap: baseurl already includes /en/rolling/, so skip lang+version -- cgit v1.2.3 From 6f35bf561b330385bbb848f96c4ea84dc6089f5c Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Thu, 7 May 2026 18:19:44 +0300 Subject: fix(docs): add missing space after colon in personalization_storage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated by [robots](https://vyos.io) --- docs/_templates/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/_templates/layout.html') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 464e73f8..fce69b86 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -19,7 +19,7 @@ 'ad_personalization': 'denied', 'analytics_storage': 'denied', 'functionality_storage': 'denied', - 'personalization_storage':'denied', + 'personalization_storage': 'denied', 'security_storage': 'granted', 'wait_for_update': 500 }); -- cgit v1.2.3