mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Merge branch 'dev' into script-simplification
This commit is contained in:
commit
9101f8a478
109 changed files with 17911 additions and 11822 deletions
|
|
@ -46,6 +46,7 @@
|
|||
url: currentUrl,
|
||||
referrer: currentRef,
|
||||
tag,
|
||||
id: identity ? identity : undefined,
|
||||
});
|
||||
|
||||
const hasDoNotTrack = () => {
|
||||
|
|
@ -174,7 +175,20 @@
|
|||
return send(getPayload());
|
||||
};
|
||||
|
||||
const identify = data => send({ ...getPayload(), data }, 'identify');
|
||||
const identify = (id, data) => {
|
||||
if (typeof id === 'string') {
|
||||
identity = id;
|
||||
}
|
||||
|
||||
cache = '';
|
||||
return send(
|
||||
{
|
||||
...getPayload(),
|
||||
data: typeof id === 'object' ? id : data,
|
||||
},
|
||||
'identify',
|
||||
);
|
||||
};
|
||||
|
||||
/* Start */
|
||||
|
||||
|
|
@ -190,6 +204,7 @@
|
|||
let initialized = false;
|
||||
let disabled = false;
|
||||
let cache;
|
||||
let identity;
|
||||
|
||||
if (autoTrack && !trackingDisabled()) {
|
||||
if (document.readyState === 'complete') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue