ImpSdk.util.getDevice

developed by Murali Balusa

ImpSdk.util.getDevice will detect the device by comparing patterns against a given userAgent and returns the respective device as desktop/mobile/tablet.

ImpSdk.util.getDevice();

Sample responses:

Response 1:
{
  'device' : 'desktop'
}

Response 2:
{
  'device' : 'mobile'
}

Response 3:
{
  'device' : 'tablet'
}