Skip to content

Commit

Permalink
get and set gclid on every pageview
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-astra-via committed Jul 1, 2024
1 parent cdf94eb commit fb0fd73
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Check failure on line 73 in src/index.ts

View workflow job for this annotation

GitHub Actions / build-test (20.x)

Delete `⏎`
if (client.url.searchParams.get('_gl')) {
try {
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit fb0fd73

Please sign in to comment.