You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in .env I added the two website id's separated by a comma. The problem is only the first website shows up in the traffic and the second does not. I tried flipping the order in the env variable, and again it is the first website that is monitored and not the second.
Database
PostgreSQL
Relevant log output
No response
Which Umami version are you using? (if relevant)
No response
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered:
Looks like Next Script will only load the first script if the src remains the same. You can use the lowercase script if you want to map through your websites, but you can't include a strategy. Example output below would work with multiple scripts.
Describe the Bug
I have my website running on both Vercel and my own domain. I wanted to monitor traffic on both these. I added two umami scripts as:
`
const UmamiScripts = () => {
const umamiWebsiteIds =
process.env.NEXT_PUBLIC_UMAMI_WEBSITE_IDS?.split(',') || [];
console.log('id', umamiWebsiteIds);
return (
<>
{umamiWebsiteIds.map((id) => {
console.log('Loading script for website ID:', id);
return (
<Script key={id} src="/scripts/umami.js" data-website-id={id} strategy="lazyOnload" />
);
})}
</>
);
};
`
in .env I added the two website id's separated by a comma. The problem is only the first website shows up in the traffic and the second does not. I tried flipping the order in the env variable, and again it is the first website that is monitored and not the second.
Database
PostgreSQL
Relevant log output
No response
Which Umami version are you using? (if relevant)
No response
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: