diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-14 00:10:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-14 00:10:27 +0300 |
commit | d6f2690ceeffc5306381618473cc4e3e613ebecf (patch) | |
tree | 96c544ef1f21e66ca2dee9fc692dcdeee590ee2b /app/views/layouts | |
parent | 718637f88ce9933f581c58e27dfffc389cbb6111 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_google_tag_manager_body.html.haml | 4 | ||||
-rw-r--r-- | app/views/layouts/_google_tag_manager_head.html.haml | 42 |
2 files changed, 0 insertions, 46 deletions
diff --git a/app/views/layouts/_google_tag_manager_body.html.haml b/app/views/layouts/_google_tag_manager_body.html.haml deleted file mode 100644 index 98d7bf5d138..00000000000 --- a/app/views/layouts/_google_tag_manager_body.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- return unless google_tag_manager_enabled? - -<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=#{google_tag_manager_id}" -height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> diff --git a/app/views/layouts/_google_tag_manager_head.html.haml b/app/views/layouts/_google_tag_manager_head.html.haml deleted file mode 100644 index 9f16b2c9005..00000000000 --- a/app/views/layouts/_google_tag_manager_head.html.haml +++ /dev/null @@ -1,42 +0,0 @@ -- return unless google_tag_manager_enabled? - -- if Feature.enabled?(:gitlab_gtm_datalayer, type: :ops) - = javascript_tag do - :plain - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - - gtag('consent', 'default', { - 'analytics_storage': 'granted', - 'ad_storage': 'granted', - 'functionality_storage': 'granted', - 'wait_for_update': 500 - }); - - gtag('consent', 'default', { - 'analytics_storage': 'denied', - 'ad_storage': 'denied', - 'functionality_storage': 'denied', - 'region': ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'IS', 'LI', 'NO', 'GB', 'PE', 'RU'], - 'wait_for_update': 500 - }); - - window.geofeed = (options) => { - dataLayer.push({ - 'event' : 'OneTrustCountryLoad', - 'oneTrustCountryId': options.country.toString() - }) - } - - const json = document.createElement('script'); - json.setAttribute('src', 'https://geolocation.onetrust.com/cookieconsentpub/v1/geo/location/geofeed'); - document.head.appendChild(json); - -= javascript_tag nonce: content_security_policy_nonce do - :plain - (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], - j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= - 'https://www.googletagmanager.com/gtm.js?id='+i+dl;j.setAttribute('nonce', - '#{content_security_policy_nonce}');f.parentNode.insertBefore(j,f); - })(window,document,'script','dataLayer','#{google_tag_manager_id}'); |