How to detect device if its Android or IOS in AMP

276 Views Asked by At

Could you please help me? I´m using AMP by Google and i need to know if its Android or IOS to display different content One link for android devices another link for iOS devices

I've tried to use amp-access tag but I can not get the user-agent, Do you have some examples? or Do you know how can i get it?

Thank you.

1

There are 1 best solutions below

0
On

Instead using AMP for this, try to write a rule within your htaccess file to detect user agent and then redirect based on said user-agent to the /amp/ variation of the page