Skip to content

Commit

Permalink
feat: introduce navigation and traffic acquisition data in form audit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Kumar Singh authored and Rahul Kumar Singh committed Jan 25, 2025
1 parent a788940 commit c0a70b9
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,16 @@ function findFormCTAForInternalNavigation(bundles, formVitals) {
existingCTA.clicks += bundle.weight;
CTAs.set(source, existingCTA);
}
// if (clickCheckpoint) {
// const { source } = clickCheckpoint;
// if (CTAs.has(source)) {
// let { clicks } = CTAs.get(source);
// clicks += bundle.weight;
// CTAs.set(source, { source, clicks });
// } else {
// CTAs.set(source, { source, clicks: bundle.weight });
// }
// }
});

// Convert CTAs Map to an array and store it in the nav object
// eslint-disable-next-line no-param-reassign
nav.CTAs = Array.from(CTAs.values());
// eslint-disable-next-line no-param-reassign
nav.totalClicksOnPage = totalClickOnPage;
return {
...nav,
CTAs: Array.from(CTAs.values()),
totalClickOnPage,
};
}
return nav;
});
}
});
Expand Down

0 comments on commit c0a70b9

Please sign in to comment.