mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Update redis package.
This commit is contained in:
parent
6291654748
commit
7f1f3b685a
8 changed files with 26 additions and 29 deletions
|
|
@ -3,7 +3,7 @@ import useMessages from 'components/hooks/useMessages';
|
|||
import useConfig from 'components/hooks/useConfig';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
export function TrackingCode({ websiteId, analyticsUrl }) {
|
||||
export function TrackingCode({ websiteId, baseUrl }) {
|
||||
const { formatMessage, messages } = useMessages();
|
||||
const { basePath } = useRouter();
|
||||
const config = useConfig();
|
||||
|
|
@ -13,9 +13,7 @@ export function TrackingCode({ websiteId, analyticsUrl }) {
|
|||
|
||||
const url = trackerScriptName?.startsWith('http')
|
||||
? trackerScriptName
|
||||
: `${
|
||||
analyticsUrl || process.env.analyticsUrl || location.origin
|
||||
}${basePath}/${trackerScriptName}`;
|
||||
: `${baseUrl || location.origin}${basePath}/${trackerScriptName}`;
|
||||
|
||||
const code = `<script async src="${url}" data-website-id="${websiteId}"></script>`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue