Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Add UTM on hard login redirect

Dave Earleyabe88cd561d6
diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts
index 0ac5f68a4..e6dcf2b47 100644
--- a/frontend/src/api/client.ts
+++ b/frontend/src/api/client.ts
@@ -47,7 +47,9 @@ api.interceptors.response.use(
if (isAuthError && (!isAllowedUnauthenticatedPath || isManageEventPath)) {
// Store the current URL before redirecting to the login page
window?.localStorage?.setItem(PREVIOUS_URL_KEY, window?.location.href);
- window?.location?.replace(LOGIN_PATH);
+ // Preserve query params (UTM tracking) during redirect
+ const searchParams = window?.location?.search || '';
+ window?.location?.replace(LOGIN_PATH + searchParams);
}
return Promise.reject(error);