forked from contentful/product-catalogue-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
395a4c1
commit 45f9ae0
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env node | ||
var buffer = '' | ||
|
||
process.stdin.setEncoding('utf8'); | ||
|
||
process.stdin.on('readable', () => { | ||
var chunk = process.stdin.read(); | ||
if (chunk !== null) { | ||
buffer += chunk | ||
} | ||
}); | ||
|
||
process.stdin.on('end', () => { | ||
process.stdout.write(buffer.replace('<!--ANALYTICS-->', ` | ||
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-PJ5RQ2" | ||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | ||
<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); | ||
})(window,document,'script','dataLayer','GTM-PJ5RQ2');</script> | ||
`)); | ||
|
||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,5 +45,6 @@ | |
<script> | ||
PC.init() | ||
</script> | ||
<!--ANALYTICS--> | ||
</body> | ||
</html> |