fix: disable analytics and tag manager
All checks were successful
Deploy ASP.NET MVC to OCI / build-and-deploy (push) Successful in 11m1s

This commit is contained in:
Ricardo Carneiro 2025-06-03 22:44:32 -03:00
parent ec77c94e5b
commit 6d11759ad1
3 changed files with 11 additions and 4 deletions

View File

@ -2,6 +2,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Google Tag Manager -->
@if (!string.IsNullOrEmpty(ViewBag.GTMId?.ToString()))
{
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
@ -12,6 +14,7 @@
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', '@ViewBag.GTMId');
</script>
}
<!-- End Google Tag Manager -->
<!-- SEO Meta Tags -->
<title>@ViewBag.Title</title>

View File

@ -35,9 +35,12 @@
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<!-- Custom JS -->
<script src="~/js/conversion.js" asp-append-version="true"></script>
@* <script src="~/js/analytics.js" asp-append-version="true"></script>
*@
@if (!string.IsNullOrEmpty(ViewBag.GTMId?.ToString()))
{
<script src="~/js/conversion.js" asp-append-version="true"></script>
<script src="~/js/analytics.js" asp-append-version="true"></script>
}
@await RenderSectionAsync("Scripts", required: false)
<!-- Conversion tracking -->

View File

@ -32,7 +32,8 @@
"SEO": {
"DefaultDomain": "https://maiusculasminusculas.com",
"DefaultSiteName": "Maiúsculas para 1a. minúsculas online",
"GoogleTagManagerId": "GTM-XXXXXXX",
//"GoogleTagManagerId": "GTM-XXXXXXX",
"GoogleTagManagerId": "",
"GoogleAnalyticsId": "GA-XXXXXXXX"
},