Add other params

This commit is contained in:
Eric Bailey
2024-01-30 15:35:03 -06:00
parent 186f2b155b
commit 8237b88638
+4 -2
View File
@@ -41,8 +41,10 @@ async function upsertParams(params: Record<string, any>) {
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',
),
)