Skip to content

Commit

Permalink
google analyticsを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
odanado committed Jan 29, 2019
1 parent 7dfe8a5 commit e958fef
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"normalize.css": "^8.0.1",
"register-service-worker": "^1.5.2",
"vue": "^2.5.17",
"vue-analytics": "^5.16.2",
"vue-class-component": "^6.0.0",
"vue-property-decorator": "^7.0.0",
"vue-router": "^3.0.2",
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Vue from "vue";
const VueAnalytics = require("vue-analytics");

import firebase from "firebase";
import WebFont from "webfontloader";
Expand Down Expand Up @@ -36,6 +37,11 @@ WebFont.load({
store.commit("setIsWebFontLoading", { isWebFontLoading: false })
});

Vue.use(VueAnalytics, {
id: "UA-49269757-16",
router
});

new Vue({
render: h => h(App),
store,
Expand Down
19 changes: 8 additions & 11 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
const package = require("./package.json")
const package = require("./package.json");

module.exports = {
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
console.log(args)
args[0].title = package.name;
args[0].description = package.description;
args[0].origin = "https://ghkw-web.firebaseapp.com"
return args
})
config.plugin("html").tap(args => {
args[0].title = package.name;
args[0].description = package.description;
args[0].origin = "https://ghkw-web.firebaseapp.com";
return args;
});
}
}
};
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8559,6 +8559,10 @@ [email protected]:
dependencies:
indexof "0.0.1"

vue-analytics@^5.16.2:
version "5.16.2"
resolved "https://registry.yarnpkg.com/vue-analytics/-/vue-analytics-5.16.2.tgz#37724aeec71bb830b1cf2d52a969cf190ef120c1"

vue-class-component@^6.0.0, vue-class-component@^6.2.0:
version "6.3.2"
resolved "https://registry.yarnpkg.com/vue-class-component/-/vue-class-component-6.3.2.tgz#e6037e84d1df2af3bde4f455e50ca1b9eec02be6"
Expand Down

0 comments on commit e958fef

Please sign in to comment.