diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/index.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/index.js index 77e8ec3e075..4a88e2f5438 100644 --- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/index.js +++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/index.js @@ -130,7 +130,7 @@ const searchConfig = getSearchConfig(params); this.dataLayer.push(event); }; - let pushGTag = function (eventName) { + let pushDataLayer = function (eventName) { let event = { event: eventName, }; @@ -173,7 +173,7 @@ const searchConfig = getSearchConfig(params); window.turbolinksLoaded = true; setTimeout(function () { - pushGTag('docs_load'); + pushDataLayer('docs_load'); }, 2000); }); @@ -191,7 +191,7 @@ const searchConfig = getSearchConfig(params); return; } - pushGTag('docs_navigate'); + pushDataLayer('docs_navigate'); }); // Preserve scroll position when navigating with Turbo on all elements with the data-preserve-scroll attribute. @@ -202,6 +202,13 @@ const searchConfig = getSearchConfig(params); window.scrollHandledByClick = {}; } + function turboClick(e) { + if (e.detail.url.includes('/docs/api')) { + // Disable Turbo for the API docs to allow for edge redirects. + e.preventDefault(); + } + } + function preserveScroll(e) { document.querySelectorAll('[data-preserve-scroll]').forEach((el) => { // Check if the event's target is a child of the element. @@ -250,6 +257,7 @@ const searchConfig = getSearchConfig(params); } window.addEventListener('turbo:click', preserveScroll); + window.addEventListener('turbo:click', turboClick); window.addEventListener('turbo:before-render', restoreScroll); window.addEventListener('turbo:render', restoreScroll); })(); diff --git a/_vendor/github.com/linode/linode-docs-theme/config.toml b/_vendor/github.com/linode/linode-docs-theme/config.toml index 8c2c09f2272..8296119a23e 100644 --- a/_vendor/github.com/linode/linode-docs-theme/config.toml +++ b/_vendor/github.com/linode/linode-docs-theme/config.toml @@ -4,9 +4,6 @@ time_format_iso8601 = "2006-01-02T15:04:05-07:00" weglot_api_key = "wg_3b3ef29c81aa81292c64d1368ee318969" -# Google Tag Manager ID used in production. -# For development/staging, see the config dir. -gtmID = "GTM-T5FXXG9" # # Adobe Analytics script used in production. # For development/staging, see the config dir. diff --git a/_vendor/github.com/linode/linode-docs-theme/config/development/config.toml b/_vendor/github.com/linode/linode-docs-theme/config/development/config.toml index 3ca8cbdca7e..850a06dfcaa 100644 --- a/_vendor/github.com/linode/linode-docs-theme/config/development/config.toml +++ b/_vendor/github.com/linode/linode-docs-theme/config/development/config.toml @@ -1,7 +1,4 @@ [params] - # GTM container used in development and on Netlify. - gtmID = "GTM-TS67W4L" - # Adobe Analytics script used in development and on Netlify. adobe_launch_script = "https://assets.adobedtm.com/fcfd3580c848/f9e7661907ee/launch-006d022c8726-development.min.js" diff --git a/_vendor/github.com/linode/linode-docs-theme/config/staging/config.toml b/_vendor/github.com/linode/linode-docs-theme/config/staging/config.toml index 57e201e67da..89e603d2676 100644 --- a/_vendor/github.com/linode/linode-docs-theme/config/staging/config.toml +++ b/_vendor/github.com/linode/linode-docs-theme/config/staging/config.toml @@ -1,7 +1,4 @@ [params] - # GTM container used in Staging (docs.staging.linode.com/docs) - # gtmID = "GTM-T5FXXG9" - # Adobe Analytics script used in Staging (docs.staging.linode.com/docs) adobe_launch_script = "https://assets.adobedtm.com/fcfd3580c848/f9e7661907ee/launch-96338797f65e-staging.min.js" diff --git a/_vendor/github.com/linode/linode-docs-theme/config/testing/config.toml b/_vendor/github.com/linode/linode-docs-theme/config/testing/config.toml index 3ca8cbdca7e..850a06dfcaa 100644 --- a/_vendor/github.com/linode/linode-docs-theme/config/testing/config.toml +++ b/_vendor/github.com/linode/linode-docs-theme/config/testing/config.toml @@ -1,7 +1,4 @@ [params] - # GTM container used in development and on Netlify. - gtmID = "GTM-TS67W4L" - # Adobe Analytics script used in development and on Netlify. adobe_launch_script = "https://assets.adobedtm.com/fcfd3580c848/f9e7661907ee/launch-006d022c8726-development.min.js" diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html b/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html index 0fc3363ca2f..6328d8c533c 100644 --- a/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html +++ b/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html @@ -126,7 +126,9 @@ x-transition.opacity :style="tooltip.style" x-show="tooltip.show"> -