From d2ce8b2d2917d7903d916c5e041100c44661e218 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') 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 a5057c9f314b8413bfca452c228165127ed79bcf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 13:41:00 +0000 Subject: fix(template): remove stray tag and add title to GTM noscript iframe Agent-Logs-Url: https://github.com/vyos/vyos-documentation/sessions/ebb95457-26ce-4636-b018-fe7b8e31778c Co-authored-by: andamasov <12631358+andamasov@users.noreply.github.com> --- docs/_templates/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index cfc59dca..3abb3413 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -59,12 +59,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 bdc4ee3ed569513cf5bca8dc2e930ea0b8a2f0f7 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Wed, 6 May 2026 23:11:40 +0300 Subject: docs(cookiebot): document the Cookiebot \xe2\x86\x92 Consent Mode v2 update path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the external dependency explicit in the template comment: Cookiebot's `uc.js` with `data-blockingmode="auto"` automatically pushes `gtag('consent','update', …)` into the dataLayer when the visitor accepts/declines categories. No in-repo update logic is needed; category mapping happens in the Cookiebot admin UI. Addresses Copilot review feedback on PR #1872. \xf0\x9f\xa4\x96 Generated by [robots](https://vyos.io) --- docs/_templates/layout.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 3abb3413..4cd4e352 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -8,7 +8,12 @@ data-blockingmode="auto" type="text/javascript"> - {# Google Consent Mode v2 defaults — deny everything until Cookiebot fires the update #} + {# Google Consent Mode v2 defaults — deny everything until Cookiebot + fires the consent update. Cookiebot's uc.js with data-blockingmode="auto" + automatically pushes gtag('consent','update', …) into dataLayer when + the visitor accepts/declines categories in the CMP banner; no in-repo + update logic is required. Categories are mapped via the Cookiebot + admin UI, not here. See https://www.cookiebot.com/en/google-consent-mode/ #} + })(window,document,'script','dataLayer','{{ gtm_id }}'); diff --git a/docs/conf.py b/docs/conf.py index 1cfe669e..fa0e9349 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -142,6 +142,7 @@ html_context = { 'github_repo': 'vyos-documentation', 'github_version': _github_version, 'conf_py_path': '/docs/', + 'gtm_id': os.environ.get('GTM_ID', ''), } # sphinx-sitemap: baseurl already includes /en/1.5/, so skip lang+version @@ -152,7 +153,6 @@ sitemap_url_scheme = '{link}' # _templates/llms.txt.j2 by the _write_llms_txt() build-finished hook # below; llms-full.txt is still auto-generated by sphinx-llms-txt. llms_txt_file = False - # Custom sidebar templates, must be a dictionary that maps document names # to template names. # -- cgit v1.2.3 From 582673e3e3273d088d3b8704f896711277b556cb Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Thu, 7 May 2026 17:47:01 +0300 Subject: fix(docs): guard GTM/Cookiebot blocks with {% if gtm_id %} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents broken googletagmanager.com requests with empty container IDs when GTM_ID is not set (local builds, preview environments). 🤖 Generated by [robots](https://vyos.io) --- docs/_templates/layout.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index a0edef7b..c594841f 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,6 +1,7 @@ {% extends "!layout.html" %} {%- set current_version = "1.5.x circinus" %} {% block extrahead %} + {% if gtm_id %} {# Cookiebot CMP — must load first so its auto-blocker can scan/block other tags #} diff --git a/docs/conf.py b/docs/conf.py index fa0e9349..99f83984 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -143,6 +143,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/1.5/, so skip lang+version -- cgit v1.2.3 From ca6ffd09a1551d6047722c5e12738aad709239ae Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Thu, 7 May 2026 18:19:46 +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') diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 7fb042f5..f74f77f7 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -24,7 +24,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