feat: ensure enableGoogleTagManager is safely checked before integration

This commit is contained in:
Simon Larsen
2025-04-16 12:59:23 +01:00
parent 00bc7cf12a
commit f4ee7fa2a3
7 changed files with 11 additions and 11 deletions

View File

@@ -103,7 +103,7 @@
</style>
<script src="https://cdn.tailwindcss.com"></script>
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {

View File

@@ -12,7 +12,7 @@
<meta name="slack-app-id" content="ACVBMTPJQ">
<meta name="description" content="OneUptime — the complete open-source observability platform.">
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
@@ -97,7 +97,7 @@
</head>
<body class="h-full bg-gray-50">
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PKQD5WH" height="0" width="0"
style="display:none;visibility:hidden"></iframe></noscript>

View File

@@ -11,7 +11,7 @@
<meta name="slack-app-id" content="ACVBMTPJQ">
<meta name="description" content="OneUptime — the complete open-source observability platform.">
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- 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],
@@ -91,7 +91,7 @@
-->
</head>
<body class="h-full bg-gray-50">
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PKQD5WH"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

View File

@@ -12,7 +12,7 @@
<meta name="slack-app-id" content="ACVBMTPJQ">
<meta name="description" content="OneUptime — the complete open-source observability platform.">
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
@@ -114,7 +114,7 @@
</head>
<body class="h-full bg-gray-50">
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PKQD5WH" height="0" width="0"
style="display:none;visibility:hidden"></iframe></noscript>

View File

@@ -14,7 +14,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({

View File

@@ -59,7 +59,7 @@
</style>
<script src="https://cdn.tailwindcss.com"></script>
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({

View File

@@ -48,7 +48,7 @@
</style>
<script src="/status-page/assets/js/tailwind-3.4.5.js"></script>
<title>Status Page</title>
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- 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],
@@ -74,7 +74,7 @@
-->
</head>
<body class="h-full bg-gray-50">
<% if(enableGoogleTagManager){ %>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PKQD5WH"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>