Jump to content

How to change a URL for a button based on the users device

Recommended Posts

Posted

Site URL: https://www.rnatranslation.com

About to release an update for an app that includes uploading to iOS and Android

There's a button for downloading the app included in the screenshot provided that currently only links to iOS

I'd like to detect if the user is on iPad, iPhone or Mac and link to the app on iOS or if the user is on any platform outside of apple products to link to the app on Android

 

Screen Shot 2021-10-07 at 4.25.05 pm.png

  • Replies 1
  • Views 439
  • Created
  • Last Reply
Posted
On 10/7/2021 at 12:26 PM, RNATranslation said:

Site URL: https://www.rnatranslation.com

About to release an update for an app that includes uploading to iOS and Android

There's a button for downloading the app included in the screenshot provided that currently only links to iOS

I'd like to detect if the user is on iPad, iPhone or Mac and link to the app on iOS or if the user is on any platform outside of apple products to link to the app on Android

 

Screen Shot 2021-10-07 at 4.25.05 pm.png

I usually use this library to detect user-agent for device identifying

UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data using JavaScript. Supports browser & node.js environment. Available as jQuery plugin & @types-ready for TypeScript library. (faisalman.github.io)

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.