mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: update Google Tag Manager javascript
This commit is contained in:
4
app/views/common/_google_tag_manager_body.html.erb
Normal file
4
app/views/common/_google_tag_manager_body.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<%= SiteSetting.gtm_container_id %>"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
@@ -2,10 +2,10 @@
|
||||
dataLayer = [<%= google_tag_manager_json %>];
|
||||
</script>
|
||||
|
||||
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=<%= SiteSetting.gtm_container_id %>"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- 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],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','<%= SiteSetting.gtm_container_id %>');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
Reference in New Issue
Block a user