Skip to content

Commit

Permalink
chore: add google tag manager code on live demo (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhayab authored Apr 7, 2022
1 parent 82b6c28 commit 198c2e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -493,5 +493,16 @@
</footer>

<script src="https://polyfill.io/v3/polyfill.min.js?features=default,Array.prototype.find,Array.prototype.includes,Promise,Object.assign,Object.entries,Object.values,IntersectionObserver"></script>
<% if (netlify) { %>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-32446386-48"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-32446386-48');
</script>
<% } %>
</body>
</html>
1 change: 1 addition & 0 deletions webpack/plugins/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default [
template: 'public/index.ejs',
templateParameters: {
appId: config.appId,
netlify: process.env.NETLIFY || false,
},
}),
];

0 comments on commit 198c2e0

Please sign in to comment.