mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
Only display first tracker script name.
This commit is contained in:
parent
6c09dd1e23
commit
223f0051ed
@ -7,7 +7,7 @@ export function TrackingCode({ websiteId }) {
|
|||||||
const { trackerScriptName } = useConfig();
|
const { trackerScriptName } = useConfig();
|
||||||
const url = trackerScriptName.startsWith('http')
|
const url = trackerScriptName.startsWith('http')
|
||||||
? trackerScriptName
|
? trackerScriptName
|
||||||
: `${location.origin}/${trackerScriptName}.js`;
|
: `${location.origin}/${trackerScriptName?.split(',')?.map(n => n.trim())?.[0]}`;
|
||||||
|
|
||||||
const code = `<script async src="${url}" data-website-id="${websiteId}"></script>`;
|
const code = `<script async src="${url}" data-website-id="${websiteId}"></script>`;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user