mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
Add 'data-debug' attribute to console log sent data
This commit is contained in:
parent
60eaaaff60
commit
80e42817af
1 changed files with 5 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
||||||
const tag = attr(_data + 'tag') || undefined;
|
const tag = attr(_data + 'tag') || undefined;
|
||||||
const autoTrack = attr(_data + 'auto-track') !== _false;
|
const autoTrack = attr(_data + 'auto-track') !== _false;
|
||||||
const dnt = attr(_data + 'do-not-track') === _true;
|
const dnt = attr(_data + 'do-not-track') === _true;
|
||||||
|
const debug = attr(_data + 'debug') === _true;
|
||||||
const excludeSearch = attr(_data + 'exclude-search') === _true;
|
const excludeSearch = attr(_data + 'exclude-search') === _true;
|
||||||
const excludeHash = attr(_data + 'exclude-hash') === _true;
|
const excludeHash = attr(_data + 'exclude-hash') === _true;
|
||||||
const domain = attr(_data + 'domains') || '';
|
const domain = attr(_data + 'domains') || '';
|
||||||
|
|
@ -148,6 +149,10 @@
|
||||||
|
|
||||||
if (!payload) return;
|
if (!payload) return;
|
||||||
|
|
||||||
|
if (debug){
|
||||||
|
console.log(`Umami Analytics Debug:`, { type, payload });
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch(endpoint, {
|
const res = await fetch(endpoint, {
|
||||||
keepalive: true,
|
keepalive: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue