mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 12:29:35 +01:00
Merge branch 'dev' of https://github.com/umami-software/umami into dev
This commit is contained in:
commit
50c2bb2af7
@ -10,7 +10,8 @@ export default {
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
replace({
|
replace({
|
||||||
'/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send',
|
'__COLLECT_API_HOST__': process.env.COLLECT_API_HOST || '',
|
||||||
|
'__COLLECT_API_ENDPOINT__': process.env.COLLECT_API_ENDPOINT || '/api/send',
|
||||||
delimiters: ['', ''],
|
delimiters: ['', ''],
|
||||||
preventAssignment: true,
|
preventAssignment: true,
|
||||||
}),
|
}),
|
||||||
|
@ -22,10 +22,9 @@
|
|||||||
const stripSearch = attr(_data + 'strip-search') === _true;
|
const stripSearch = attr(_data + 'strip-search') === _true;
|
||||||
const domain = attr(_data + 'domains') || '';
|
const domain = attr(_data + 'domains') || '';
|
||||||
const domains = domain.split(',').map(n => n.trim());
|
const domains = domain.split(',').map(n => n.trim());
|
||||||
const root = hostUrl
|
const host =
|
||||||
? hostUrl.replace(/\/$/, '')
|
hostUrl || '__COLLECT_API_HOST__' || currentScript.src.split('/').slice(0, -1).join('/');
|
||||||
: currentScript.src.split('/').slice(0, -1).join('/');
|
const endpoint = `${host.replace(/\/$/, '')}__COLLECT_API_ENDPOINT__`;
|
||||||
const endpoint = `${root}/api/send`;
|
|
||||||
const screen = `${width}x${height}`;
|
const screen = `${width}x${height}`;
|
||||||
const eventRegex = /data-umami-event-([\w-_]+)/;
|
const eventRegex = /data-umami-event-([\w-_]+)/;
|
||||||
const eventNameAttribute = _data + 'umami-event';
|
const eventNameAttribute = _data + 'umami-event';
|
||||||
|
Loading…
Reference in New Issue
Block a user