Last active
July 5, 2017 22:56
-
-
Save morten-olsen/da4596a115f9afd93fc1686c5460b7dd to your computer and use it in GitHub Desktop.
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
| { | |
| "name": "gtm", | |
| "arguments": [ | |
| "gtmId" | |
| ], | |
| "snippet": "(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='{{resources.gtm}}';f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','{{settings.gtmId}}');", | |
| "resources": { | |
| "gtm": { | |
| "mimeType": "text/javascript", | |
| "url": "https://www.googletagmanager.com/gtm.js?id={{gtmId}}", | |
| "cacheTime": 900 | |
| } | |
| } | |
| } |
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
| var elm = document.createElement('div'); | |
| elm.innerHTML = 'This text was loaded through snippets'; | |
| document.body.appendChild(elm); |
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
| { | |
| "name": "hello", | |
| "arguments": [ | |
| "hello" | |
| ], | |
| "snippet": "(function() { var tag = document.createElement('script'); tag.src='{{resources.test}}'; document.body.appendChild(tag)})()", | |
| "resources": { | |
| "test": { | |
| "mimeType": "text/javascript", | |
| "url": "https://gist.githubusercontent.com/morten-olsen/da4596a115f9afd93fc1686c5460b7dd/raw/snippet.js" | |
| } | |
| } | |
| } |
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
| test1234 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment