Push sur master trop rapide

pull/2093/head
Johan Girod 2022-04-08 11:18:54 +02:00
parent 658c186f51
commit 39d836c709
1 changed files with 15 additions and 15 deletions

View File

@ -87,22 +87,22 @@ export function createTracker(siteId?: string, doNotTrack = false) {
}
}
#currentPageInfo: PageHit = { page: 'accueil' }
#send: ATTracker['events']['send'] = (type, data) => {
if (type === 'page.display') {
this.#currentPageInfo = data
super.events.send(type, data)
return
}
if (!('click' in data)) {
throw new Error('invalid argument error')
}
super.events.send(type, { ...this.#currentPageInfo, ...data })
}
// #currentPageInfo: PageHit = { page: 'accueil' }
// #send: ATTracker['events']['send'] = (type, data) => {
// if (type === 'page.display') {
// this.#currentPageInfo = data
// super.events.send(type, data)
// return
// }
// if (!('click' in data)) {
// throw new Error('invalid argument error')
// }
// super.events.send(type, { ...this.#currentPageInfo, ...data })
// }
events = {
send: this.#send,
}
// events = {
// send: this.#send,
// }
}
return Tag