const platform = navigator.platform || ''; const userAgent = navigator.userAgent || ''; const isAppleDevice = /iPhone|iPad|MacIntel/.test(platform) || /iPhone|iPad|Mac OS/.test(userAgent); // Set redirect URL and message based on device const redirectUrl = isAppleDevice ? 'https://www.apple.com/watch' : 'https://store.google.com/product/pixel_watch_3?hl=en-US';
reply
- Chromium browsers (tested in Edge, Chrome, Brave) go to Pixel Watch,
- Android devices go to Pixel Watch,
- Apple devices go to Apple Watch,
- Firefox brings you to Apple Watch.
It might also be randomized, but that's what my tests got me, and only the Firefox one doesn't make humorous sense.
I had read your post correctly. I just provided more information for a cases that matched two of your conditions