Migrate vue-gtag to npm package

This commit is contained in:
Andrei Andreev 2022-02-06 21:47:57 +03:00
parent 2e90d78404
commit c599a26de3
4 changed files with 11 additions and 17 deletions

View File

@ -2,6 +2,7 @@ import { notify } from "./notify.js";
import { state } from "./ui.init.js";
import VTooltip from "v-tooltip";
import { useLongPress, useRepeatingClick } from "./longpress";
import VueGtag from "vue-gtag";
Vue.mixin({
computed: {
@ -178,6 +179,9 @@ Vue.use(VTooltip);
useLongPress(Vue);
useRepeatingClick(Vue);
Vue.use(VueGtag, {
config: { id: "UA-77268961-1" }
});
export const ui = new Vue({
el: "#ui",

7
package-lock.json generated
View File

@ -11111,6 +11111,11 @@
}
}
},
"vue-gtag": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/vue-gtag/-/vue-gtag-1.16.1.tgz",
"integrity": "sha512-5vs0pSGxdqrfXqN1Qwt0ZFXG0iTYjRMu/saddc7QIC5yp+DKgjWQRpGYVa7Pq+KbThxwzzMfo0sGi7ISa6NowA=="
},
"vue-hot-reload-api": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
@ -11734,4 +11739,4 @@
}
}
}
}
}

View File

@ -25,6 +25,7 @@
"vis-network": "^5.1.1",
"vis-util": "^4.0.0",
"vue": "^2.6.11",
"vue-gtag": "^1.16.1",
"vue-splitpane": "^1.0.6",
"vuedraggable": "^2.24.3"
},

View File

@ -22,22 +22,6 @@
<link rel="stylesheet" type="text/css" href="stylesheets/time-studies.css">
<link rel="stylesheet" type="text/css" href="stylesheets/tooltips.css">
<link rel="stylesheet" type="text/css" href="stylesheets/vis-network.css">
<script>
(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', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-77268961-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>