Skip to content

Instantly share code, notes, and snippets.

View Burgov's full-sized avatar

Bart van den Burg Burgov

View GitHub Profile
@Burgov
Burgov / fritsTracking.js
Last active August 31, 2021 12:42 — forked from stijnjanmaat/fritsTracking.js
Frits Tracking at Affiliate
// Managed by Frits
const init = () => {
let _handler = () => {}; // just an empty function in case no listener is registered.
setTimeout(() => {
_handler({ myEventData: 'something' });
}, 1000);
return {
onEvent: (handler) => { _handler = handler }