CINXE.COM

Redirect to the App Store

<!DOCTYPE html> <html> <head> <title>Redirect to the App Store</title> </head> <body> <script> function isiOS() { return /iPhone|iPad|iPod/i.test(navigator.userAgent); } function isAndroid() { return /Android/i.test(navigator.userAgent); } function getQueryParameters(queryString) { var queryParams = {}; var pairs = queryString.split('&'); for (var i = 0; i < pairs.length; i++) { var pair = pairs[i].split('='); var key = decodeURIComponent(pair[0]); var value = decodeURIComponent(pair[1] || ''); if (key === 'source' || key === 'medium' || key === 'term' || key === 'campaign' || key === 'ppid') { queryParams[key] = value; } } queryParams.source = encodeURIComponent(queryParams.source || 'none'); queryParams.medium = encodeURIComponent(queryParams.medium || 'none'); queryParams.campaign = encodeURIComponent(queryParams.campaign || queryParams.term || 'none'); queryParams.ppid = encodeURIComponent(queryParams.ppid || 'none'); return queryParams; } function redirectToStore() { var queryString = window.location.search.substring(1); var queryParams = getQueryParameters(queryString); var redirectUrl; if (isiOS()) { if (queryParams.campaign === 'confirmationpage') { redirectUrl = `https://apps.apple.com/app/holidaycheck-urlaub-reisen/id431838682?ppid=dfd4c46f-ef6d-4e13-8147-917545ae1760&ct=${queryParams.source}-${queryParams.medium}-${queryParams.campaign}&mt=8`; } else { redirectUrl = `https://apps.apple.com/app/holidaycheck-urlaub-reisen/id431838682?pt=300868&ct=${queryParams.source}-${queryParams.medium}-${queryParams.campaign}&mt=8`; if (queryParams.ppid != 'none') { redirectUrl += `&ppid=${queryParams.ppid}`; } } } else if (isAndroid()) { redirectUrl = `https://play.google.com/store/apps/details?id=com.holidaycheck&referrer=utm_source%3D${queryParams.source}%26utm_medium%3D${queryParams.medium}%26utm_term%3D${queryParams.campaign}%26utm_campaign%3D${queryParams.campaign}`; } else { redirectUrl = `https://${window.location.hostname}/app?${queryString}`; } window.location.href = redirectUrl; } redirectToStore(); </script> </body> </html>