mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23: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),
|
(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)
|
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');
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
ga('create', 'UA-100157497-1', 'auto');
|
ga('create', 'UA-100157497-1', 'auto');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
</script>
|
</script>
|
||||||
|
@ -20,10 +20,13 @@
|
|||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
(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)
|
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');
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
</script><%
|
||||||
ga('create', 'UA-100157497-1', 'auto');
|
if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>
|
||||||
|
<script>
|
||||||
|
ga('create', '<%= htmlWebpackPlugin.options.googleAnalytics.trackingId %>', 'auto');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
</script>
|
</script><%
|
||||||
|
} %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="entire-game-container" style="visibility:hidden;">
|
<div id="entire-game-container" style="visibility:hidden;">
|
||||||
|
@ -21,6 +21,9 @@ module.exports = (env, argv) => ({
|
|||||||
title: "Bitburner" + (argv.mode === 'development' ? ' - development' : ""),
|
title: "Bitburner" + (argv.mode === 'development' ? ' - development' : ""),
|
||||||
template: "src/index.html",
|
template: "src/index.html",
|
||||||
favicon: "favicon.ico",
|
favicon: "favicon.ico",
|
||||||
|
googleAnalytics: {
|
||||||
|
trackingId: 'UA-100157497-1'
|
||||||
|
},
|
||||||
meta: {},
|
meta: {},
|
||||||
minify: argv.mode === 'development' ? false : {
|
minify: argv.mode === 'development' ? false : {
|
||||||
collapseBooleanAttributes: true,
|
collapseBooleanAttributes: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user