From 8237b8863830199fcc93e02045f0b1d91d13285f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 30 Jan 2024 15:35:03 -0600 Subject: [PATCH] Add other params --- src/lib/utm.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/utm.ts b/src/lib/utm.ts index a56d8fd7bc..77dd5ca8e7 100644 --- a/src/lib/utm.ts +++ b/src/lib/utm.ts @@ -41,8 +41,10 @@ async function upsertParams(params: Record) { export function handleIncomingURL(url: string) { const {searchParams} = new URL(url, 'http://throwaway.com') const params = Object.fromEntries( - Array.from(searchParams.entries()).filter(([key]) => - key.startsWith('utm_'), + Array.from(searchParams.entries()).filter( + ([key]) => + // TODO handle others? + key.startsWith('utm_') || key === 'gclid' || key === 'dclid', ), )