mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-11 07:22:19 +01:00
Implemented embed of analytics during build
This commit is contained in:
12
Gruntfile.js
12
Gruntfile.js
@@ -39,12 +39,20 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
copy: {
|
||||
files: {
|
||||
main: {
|
||||
files: [{
|
||||
src: 'src/*.*',
|
||||
dest: 'build/',
|
||||
flatten: true,
|
||||
expand: true
|
||||
}, {
|
||||
src: 'src/js/analytics.js',
|
||||
dest:'build/js/',
|
||||
flatten: true,
|
||||
expand: true
|
||||
}]
|
||||
}
|
||||
|
||||
},
|
||||
processhtml: {
|
||||
build: {
|
||||
@@ -53,7 +61,7 @@ module.exports = function(grunt) {
|
||||
}
|
||||
}
|
||||
},
|
||||
clean: ['/build']
|
||||
clean: ['build/**']
|
||||
});
|
||||
|
||||
// Load the plugin that provides the "uglify" task.
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
<script type="text/javascript" src="js/app/cmd/commands.js"></script>
|
||||
<!-- /build -->
|
||||
|
||||
<!-- build:js js/analytics.js -->
|
||||
<!-- /build -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/styles.css" />
|
||||
</head>
|
||||
<body id="rootView" class="dark">
|
||||
|
||||
7
src/js/analytics.js
Normal file
7
src/js/analytics.js
Normal file
@@ -0,0 +1,7 @@
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(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','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-61569164-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
Reference in New Issue
Block a user