diff --git a/pages/api/send.ts b/pages/api/send.ts index 05901f92..51ddb980 100644 --- a/pages/api/send.ts +++ b/pages/api/send.ts @@ -121,7 +121,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => { const refUrl = new URL(referrer); referrerPath = refUrl.pathname; referrerQuery = refUrl.search.substring(1); - referrerDomain = refUrl.hostname; + referrerDomain = refUrl.hostname.replace(/www\./, ''); } if (process.env.REMOVE_TRAILING_SLASH) {