initial setup. add crossdomain tracking.

This commit is contained in:
Sergei Meza 2022-10-13 18:18:59 +09:00
parent 0cb14f3f6c
commit fa4130ebce
6 changed files with 196 additions and 2 deletions

View file

@ -86,7 +86,10 @@
return fetch(endpoint, {
method: 'POST',
body: JSON.stringify({ type, payload }),
headers: assign({ 'Content-Type': 'application/json' }, { ['x-umami-cache']: cache }),
headers: assign(
{ 'Content-Type': 'application/json' },
{ ['x-umami-cache']: cache, ['x-lemonsquare-cache']: cache },
),
})
.then(res => res.text())
.then(text => (cache = text));
@ -194,6 +197,7 @@
umami.trackEvent = trackEvent;
window.umami = umami;
window.lemonsquare = umami;
}
/* Start */