diff options
Diffstat (limited to 'app/views/layouts/_google_tag_manager_head.html.haml')
-rw-r--r-- | app/views/layouts/_google_tag_manager_head.html.haml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/views/layouts/_google_tag_manager_head.html.haml b/app/views/layouts/_google_tag_manager_head.html.haml index 97e118aba93..21b9a604a35 100644 --- a/app/views/layouts/_google_tag_manager_head.html.haml +++ b/app/views/layouts/_google_tag_manager_head.html.haml @@ -20,6 +20,17 @@ '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); + - if Feature.enabled?(:gtm_nonce, type: :ops) = javascript_tag nonce: content_security_policy_nonce do :plain |