Skip to content

Commit abe88cd

Browse files
committed
Add UTM on hard login redirect
1 parent 6213e64 commit abe88cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/api/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ api.interceptors.response.use(
4747
if (isAuthError && (!isAllowedUnauthenticatedPath || isManageEventPath)) {
4848
// Store the current URL before redirecting to the login page
4949
window?.localStorage?.setItem(PREVIOUS_URL_KEY, window?.location.href);
50-
window?.location?.replace(LOGIN_PATH);
50+
// Preserve query params (UTM tracking) during redirect
51+
const searchParams = window?.location?.search || '';
52+
window?.location?.replace(LOGIN_PATH + searchParams);
5153
}
5254

5355
return Promise.reject(error);

0 commit comments

Comments
 (0)