Adding google analytic

This commit is contained in:
Mosab Ibrahim 2020-05-07 21:41:45 +02:00
parent cd98249fd5
commit b7ed396eef
4 changed files with 25 additions and 11 deletions

5
package-lock.json generated
View file

@ -11435,6 +11435,11 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz",
"integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ=="
},
"vue-analytics": {
"version": "5.22.1",
"resolved": "https://registry.npmjs.org/vue-analytics/-/vue-analytics-5.22.1.tgz",
"integrity": "sha512-HPKQMN7gfcUqS5SxoO0VxqLRRSPkG1H1FqglsHccz6BatBatNtm/Vyy8brApktZxNCfnAkrSVDpxg3/FNDeOgQ=="
},
"vue-clipboard2": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.1.tgz",

View file

@ -14,6 +14,7 @@
"js-beautify": "^1.11.0",
"tailwindcss": "^1.4.4",
"vue": "^2.6.11",
"vue-analytics": "^5.22.1",
"vue-clipboard2": "^0.3.1"
},
"devDependencies": {

View file

@ -1,19 +1,22 @@
<template>
<div class="min-h-screen bg-gray-100 font-roboto" id="app">
<Header></Header>
<master-component></master-component>
</div>
<div class="min-h-screen bg-gray-100 font-roboto" id="app">
<Header></Header>
<master-component></master-component>
</div>
</template>
<script>
import Header from "./components/Header";
import MasterComponent from "./components/Master";
import Header from "./components/Header";
import MasterComponent from "./components/Master";
export default {
components: {
Header , MasterComponent
}
}
export default {
components: {
Header, MasterComponent
},
mounted() {
this.$ga.page('/');
}
}
</script>
<style src="./assets/css/app.css"></style>

View file

@ -1,11 +1,16 @@
import Vue from 'vue'
import App from './App.vue'
import VueClipboard from 'vue-clipboard2';
import VueAnalytics from 'vue-analytics';
Vue.config.productionTip = false;
Vue.use(VueClipboard);
Vue.use(VueAnalytics, {
id: 'UA-161702225-3'
});
Vue.filter('toId', (componentName) => {
return componentName.toLowerCase().replace(/ /g, '-')
});