feat: telemetry module
This commit is contained in:
@@ -17,7 +17,6 @@ import store from './store'
|
||||
// ====================================
|
||||
|
||||
import localization from './modules/localization'
|
||||
import telemetry from './modules/telemetry'
|
||||
|
||||
// ====================================
|
||||
// Load Helpers
|
||||
|
@@ -121,7 +121,7 @@ export default {
|
||||
}
|
||||
|
||||
this.$helpers._.delay(() => {
|
||||
axios.post('/syscheck').then(resp => {
|
||||
axios.post('/syscheck', self.conf).then(resp => {
|
||||
if (resp.data.ok === true) {
|
||||
self.syscheck.ok = true
|
||||
self.syscheck.results = resp.data.results
|
||||
|
@@ -1,7 +1,5 @@
|
||||
import GRAPHQL from './graphql'
|
||||
import TELEMETRY from './telemetry'
|
||||
|
||||
export default {
|
||||
GRAPHQL,
|
||||
TELEMETRY
|
||||
GRAPHQL
|
||||
}
|
||||
|
@@ -1,4 +0,0 @@
|
||||
export default {
|
||||
GA_ID: 'UA-9094100-7',
|
||||
GA_REMOTE: 'http://www.google-analytics.com/collect'
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
import uuid from 'uuid/v4'
|
||||
|
||||
/* global CONSTANTS, wiki */
|
||||
|
||||
export default {
|
||||
cid: '',
|
||||
init() {
|
||||
this.cid = uuid()
|
||||
},
|
||||
sendEvent() {
|
||||
wiki.$http.post(CONSTANTS.TELEMETRY.GA_REMOTE, {
|
||||
v: 1, // API version
|
||||
tid: CONSTANTS.TELEMETRY.GA_ID, // Tracking ID
|
||||
aip: 1, // Anonymize IP
|
||||
ds: 'server', // Data source
|
||||
t: 'event', // Hit Type
|
||||
ec: 'setup', // Event Category
|
||||
ea: 'start', // Event Action
|
||||
el: 'success', // Event Label
|
||||
ev: 1 // Event Value
|
||||
}).then(resp => {
|
||||
|
||||
}, err => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user