mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
[refactor] Google Analytics is controlled by Webpack
This commit is contained in:
parent
552ce183c1
commit
2deeaef349
@ -20,7 +20,8 @@
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
</script>
|
||||
<script>
|
||||
ga('create', 'UA-100157497-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
|
@ -20,10 +20,13 @@
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-100157497-1', 'auto');
|
||||
</script><%
|
||||
if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>
|
||||
<script>
|
||||
ga('create', '<%= htmlWebpackPlugin.options.googleAnalytics.trackingId %>', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</script><%
|
||||
} %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="entire-game-container" style="visibility:hidden;">
|
||||
|
@ -21,6 +21,9 @@ module.exports = (env, argv) => ({
|
||||
title: "Bitburner" + (argv.mode === 'development' ? ' - development' : ""),
|
||||
template: "src/index.html",
|
||||
favicon: "favicon.ico",
|
||||
googleAnalytics: {
|
||||
trackingId: 'UA-100157497-1'
|
||||
},
|
||||
meta: {},
|
||||
minify: argv.mode === 'development' ? false : {
|
||||
collapseBooleanAttributes: true,
|
||||
|
Loading…
Reference in New Issue
Block a user