Open thibaultleouay opened 1 year ago
We're already tracking the full hostname but we don't expose a hostname filter/domain selector yet. Do you want to filter for a specific domain eg my.custom-domain.com
and see all the pageviews/events from it?
yep that would do the job, I want to be able to differentiate the page views from our landing page www.openstatus.dev -> page / and custom-domain.openstatus.dev -> page /
What i thought of doing was something like these
<Analytics
beforeSend={(event) => {
if (event.host.includes('www')) {
return event;
} else {
return {
...event,
url: `/domain/${event.host}/${url.toString()}`,
};;
}
}}
/>
This is how I managed it
https://github.com/openstatusHQ/openstatus/blob/main/apps/web/src/app/_components/analytics.tsx
In order to catch the custom subdomain
Their might be a better way ?
@thibaultleouay looks good. for now this is the only way to "see" that data. We'll let you know once we add support for hostnames!
Hey, is there an update on this yet? I want to track analytics for a multi-tenant app. how do i do this ? Also the openstatus github link isn't working. Could you explain on how i can achieve this currently ?
@nikl216
We removed it from subdomain pages but you have achieve it like this :
https://github.com/openstatusHQ/openstatus/blob/935787d332ea3f5ac36248ee1865e75790bc370e/apps/web/src/app/_components/analytics.tsx
+1 for this feature, filter analytics by subdomain
im using multiple TLDs on a single project for localization (.com, .de, .fr) and cannot differentiate them in the analytics. this would be a very beneficial feature!
For openstatus we allow users to create subdomain hosted under our own domain
They are rewritten using next middleware
Is it possible to track this subdomain ? Maybe with before send function?
Does the event contains the full request hostname ?