chore(analytics): filter out c_ params from console report

- We can check them in the full url.
This commit is contained in:
Matej Kriz
2026-02-12 16:37:24 +01:00
committed by Matěj Kříž
parent 103f882d46
commit 5875723651

View File

@@ -89,7 +89,9 @@ export const reportEvent = async ({
loggerEnabled,
}: ReportEventProps) => {
if (loggerEnabled) {
const payload = Object.fromEntries(new URL(url).searchParams.entries());
const payload = Object.fromEntries(
[...new URL(url).searchParams.entries()].filter(([key]) => !key.startsWith('c_')),
);
// eslint-disable-next-line no-console
console.log(`[Analytics] '${type}'`, { type, url, retry, payload });
}