From d6d7d574aeeb306420798ac03b559ecd9964af8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9CVeLiTi=E2=80=9D?= <“info@veliti.nl”>
Date: Tue, 21 Oct 2025 15:21:20 +0200
Subject: [PATCH] Implement Google Tag Manager integration based on cookie
consent; remove bank account info from contact page
---
custom/customfunctions.php | 23 +++++++++++++++++++++--
custom/pages/contact.php | 1 -
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/custom/customfunctions.php b/custom/customfunctions.php
index c592437..b344175 100644
--- a/custom/customfunctions.php
+++ b/custom/customfunctions.php
@@ -39,10 +39,27 @@ function template_header($title,$head) {
if (maintenanceMode){$maintenanceMode = maintenanceMode();} else {$maintenanceMode = '';}
$veliti_analytics = '';
-if (veliti_analytics){
+if (veliti_analytics && $_COOKIE['cookie_consent'] == 'accepted'){
$veliti_analytics = '';
}
+$tag_manager_header = '';
+$tag_manager_body = '';
+
+if (isset($_COOKIE['cookie_consent']) && $_COOKIE['cookie_consent'] == 'accepted') {
+
+ $tag_manager_header = "
+ ";
+
+ $tag_manager_body = '';
+}
+
$view = '
@@ -54,6 +71,7 @@ $view = '
'.$head.'
+ '.$tag_manager_header.'