Skip to content

Commit

Permalink
[fix] 데이터 전송후 링크 이동으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
euije committed Mar 15, 2024
1 parent 368fcb7 commit a2938a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/event/university/Booth/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ const GTMComponent = () => {

useEffect(() => {
if (typeof window !== 'undefined') {
let redirectTo;
let platform;
if (isIOS) {
window.location.replace(APP_STORE_URL);
platform = 'iOS';
redirectTo = APP_STORE_URL;
} else if (isAndroid) {
window.location.replace(GOOGLE_PLAY_URL);
redirectTo = GOOGLE_PLAY_URL;
platform = 'Android';
} else {
window.location.replace(LANDING_PAGE_URL);
platform = 'others';
redirectTo = LANDING_PAGE_URL;
}
sendGTMEvent({
id: params.get('id'),
platform: platform,
from: document.referrer,
});
window.location.replace(redirectTo);
}
}, [params]);

Expand Down

0 comments on commit a2938a1

Please sign in to comment.