From fb0fd738a6fb0ded5575dc175c6109ae4304ec93 Mon Sep 17 00:00:00 2001 From: Yair Dovrat Date: Mon, 1 Jul 2024 16:06:29 +0200 Subject: [PATCH 1/2] get and set gclid on every pageview --- src/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index e1d08f0..4b12463 100644 --- a/src/index.ts +++ b/src/index.ts @@ -70,12 +70,6 @@ export const eventHandler = async ( // u_nplug: 3 // u_nmime: 4 - if (settings.conversionLinker) { - // only handle conversion linker if gclid query param exists - if (client.url.searchParams.get('gclid')) { - conversionLinkerHandler(event, settings) - } - } if (client.url.searchParams.get('_gl')) { try { @@ -139,6 +133,7 @@ export const eventHandler = async ( export default async function (manager: Manager, settings: ComponentSettings) { manager.addEventListener('pageview', event => { + conversionLinkerHandler(event, settings) eventHandler('pageview', event, settings) }) manager.addEventListener('conversion', event => { From 64bc63be5f1dfdb8bf1d4d683c8be408800c5505 Mon Sep 17 00:00:00 2001 From: Yair Dovrat Date: Mon, 1 Jul 2024 16:08:10 +0200 Subject: [PATCH 2/2] address prettier error --- src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 4b12463..1b4331e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -70,7 +70,6 @@ export const eventHandler = async ( // u_nplug: 3 // u_nmime: 4 - if (client.url.searchParams.get('_gl')) { try { const gclaw = atob(