update to better tracking

This commit is contained in:
2017-08-23 17:33:30 +02:00
parent 5068a2d035
commit 944837f338
3 changed files with 17 additions and 11 deletions

View File

@ -26,12 +26,15 @@ export class Analytics {
identifier: identifierArg,
analyticsData: analyticsDataArg
}
let dataToSendJson = JSON.stringify(dataToSend)
console.log(dataToSend)
await plugins.smartrequest.post(this.apiEndPoint, {
headers: {
'authenticate': this.secretKey
'authenticate': this.secretKey,
'Content-Type': 'application/json'
},
requestBody: dataToSendJson
requestBody: dataToSend
}).catch(err => {
console.log(err)
})
}
}