fix indention
This commit is contained in:
parent
b1b7072329
commit
c1113dc257
@ -1,22 +1,22 @@
|
|||||||
import * as plugins from './smartanalytics.plugins'
|
import * as plugins from './smartanalytics.plugins'
|
||||||
|
|
||||||
export let event = (trackingIdArg: string, appNameArg: string, eventCategoryArg: string, eventActionArg, eventLabelArg: string = 'null') => {
|
export let event = (trackingIdArg: string, appNameArg: string, eventCategoryArg: string, eventActionArg, eventLabelArg: string = 'null') => {
|
||||||
let payload: string = 'v=1' +
|
let payload: string = 'v=1' +
|
||||||
`&tid=${trackingIdArg}` + // the tracking ID
|
`&tid=${trackingIdArg}` + // the tracking ID
|
||||||
'&cid=555' +
|
'&cid=555' +
|
||||||
'&aip=1' + // anonymize the IP
|
'&aip=1' + // anonymize the IP
|
||||||
'&t=event' +
|
'&t=event' +
|
||||||
`&ec=${eventCategoryArg}` +
|
`&ec=${eventCategoryArg}` +
|
||||||
`&ea=${eventActionArg}` +
|
`&ea=${eventActionArg}` +
|
||||||
`&el=${eventLabelArg}` +
|
`&el=${eventLabelArg}` +
|
||||||
'&ev=300' +
|
'&ev=300' +
|
||||||
`&an=${eventLabelArg}`
|
`&an=${eventLabelArg}`
|
||||||
send(payload)
|
send(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let send = async (requestBodyArg: string) => {
|
let send = async (requestBodyArg: string) => {
|
||||||
await plugins.smartrequest.post('https://www.google-analytics.com/collect', {
|
await plugins.smartrequest.post('https://www.google-analytics.com/collect', {
|
||||||
requestBody: requestBodyArg
|
requestBody: requestBodyArg
|
||||||
})
|
})
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user