Add other params
This commit is contained in:
+4
-2
@@ -41,8 +41,10 @@ async function upsertParams(params: Record<string, any>) {
|
|||||||
export function handleIncomingURL(url: string) {
|
export function handleIncomingURL(url: string) {
|
||||||
const {searchParams} = new URL(url, 'http://throwaway.com')
|
const {searchParams} = new URL(url, 'http://throwaway.com')
|
||||||
const params = Object.fromEntries(
|
const params = Object.fromEntries(
|
||||||
Array.from(searchParams.entries()).filter(([key]) =>
|
Array.from(searchParams.entries()).filter(
|
||||||
key.startsWith('utm_'),
|
([key]) =>
|
||||||
|
// TODO handle others?
|
||||||
|
key.startsWith('utm_') || key === 'gclid' || key === 'dclid',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user