Skip to content

Commit

Permalink
clean console
Browse files Browse the repository at this point in the history
  • Loading branch information
EryouHao committed Sep 22, 2019
1 parent 5bdf510 commit 4e1b98d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/helpers/analytics.ts
Expand Up @@ -35,8 +35,7 @@ class Analytics {
public async pageView(url: string, title?: string) {
this.getClientId(async (clientId: any) => {
try {
const res = await this.ga.pageview(hostname, url, title, 1, clientId)
console.log(res)
await this.ga.pageview(hostname, url, title, 1, clientId)
} catch (e) {
console.error(e)
}
Expand All @@ -46,11 +45,10 @@ class Analytics {
public async event(evCategory: string, evAction: string, options: EvOptions) {
this.getClientId(async (clientId: any) => {
try {
const res = await this.ga.event(evCategory, evAction, {
await this.ga.event(evCategory, evAction, {
...options,
clientID: clientId,
})
console.log(res)
} catch (e) {
console.error(e)
}
Expand All @@ -60,8 +58,7 @@ class Analytics {
public async exception(exDesc: string, exFatal: any) {
this.getClientId(async (clientId: any) => {
try {
const res = await this.ga.exception(exDesc, exFatal)
console.log(res)
await this.ga.exception(exDesc, exFatal)
} catch (e) {
console.error(e)
}
Expand Down

0 comments on commit 4e1b98d

Please sign in to comment.