Last active
September 10, 2019 15:02
-
-
Save slavafomin/44eac0bd6a3533914991ec2603b82e6e to your computer and use it in GitHub Desktop.
Google Tag Manager script unminified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window['dataLayer'] = window['dataLayer'] || []; | |
window['dataLayer'].push({ | |
'gtm.start': new Date().getTime(), | |
event: 'gtm.js' | |
}); | |
const firstScriptElement = document.getElementsByTagName('script')[0]; | |
const scriptElement = document.createElement('script') | |
scriptElement.async = true; | |
scriptElement.src = 'https://www.googletagmanager.com/gtm.js?id=GTM-1234567'; | |
firstScriptElement.parentNode.insertBefore(scriptElement, firstScriptElement); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment