tracker: remove unstarted call

This commit is contained in:
nick-delirium 2025-01-24 11:27:32 +01:00
parent 6ccf2e2887
commit f4c94aa2d1
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -242,15 +242,15 @@ export default class API {
signalStartIssue = (reason: string, missingApi: string[]) => { signalStartIssue = (reason: string, missingApi: string[]) => {
const doNotTrack = this.checkDoNotTrack() const doNotTrack = this.checkDoNotTrack()
const req = new XMLHttpRequest() console.log(
const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT "Tracker couldn't start due to:",
req.open('POST', orig + '/v1/web/not-started')
req.send(
JSON.stringify({ JSON.stringify({
trackerVersion: 'TRACKER_VERSION', trackerVersion: 'TRACKER_VERSION',
projectKey: this.options.projectKey, projectKey: this.options.projectKey,
doNotTrack, doNotTrack,
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason, reason: missingApi.length
? `missing api: ${missingApi.join(',')}`
: reason,
}), }),
) )
} }