The device information endpoint provides detailed breakdowns of the hardware and software your visitors use to access your redirects, including device types, operating systems, and browsers.
Endpoint
GET /analytics/redirect/:redirectId/stats/devices
Function signature
getDeviceInfo (
redirectId : string ,
params ?: { start? : string ; end ?: string }
): Promise < AxiosResponse >
Path parameters
The unique identifier of the redirect to retrieve device information for
Query parameters
Start date for the analytics period in ISO 8601 format Example: 2024-01-01T00:00:00Z
End date for the analytics period in ISO 8601 format Example: 2024-01-31T23:59:59Z
Device information is parsed from the User-Agent header. Results may vary for clients that modify or obscure their user agent strings.
Response
The endpoint returns comprehensive device analytics organized by category:
Device type breakdown Device type: mobile, desktop, tablet, tv, console, wearable, or unknown
Number of hits from this device type
Percentage of total traffic from this device type
Operating system breakdown Operating system name (e.g., Windows, macOS, iOS, Android)
OS version (e.g., 11, 14.5, Ventura)
Number of hits from this OS
Percentage of total traffic from this OS
Browser breakdown Browser name (e.g., Chrome, Safari, Firefox, Edge)
Number of hits from this browser
Percentage of total traffic from this browser
Percentage of traffic from mobile devices
Percentage of traffic from desktop devices
Most common operating system
The redirect ID for which data was retrieved
Start of the analyzed period
End of the analyzed period
Example request
TypeScript
JavaScript
cURL
Python
import { getDeviceInfo } from '@quickleap/api' ;
const response = await getDeviceInfo ( 'redirect_abc123' , {
start: '2024-01-01T00:00:00Z' ,
end: '2024-01-31T23:59:59Z'
});
const { devices , operatingSystems , browsers , summary } = response . data . data ;
console . log ( `Mobile traffic: ${ summary . mobilePercentage } %` );
console . log ( `Desktop traffic: ${ summary . desktopPercentage } %` );
console . log ( `Top browser: ${ summary . topBrowser } ` );
// Display device breakdown
devices . forEach ( device => {
console . log ( ` ${ device . type } : ${ device . hits } hits ( ${ device . percentage } %)` );
});
Example response
{
"data" : {
"devices" : [
{
"type" : "mobile" ,
"hits" : 25678 ,
"percentage" : 56.2
},
{
"type" : "desktop" ,
"hits" : 18234 ,
"percentage" : 39.9
},
{
"type" : "tablet" ,
"hits" : 1766 ,
"percentage" : 3.9
}
],
"operatingSystems" : [
{
"name" : "iOS" ,
"version" : "17" ,
"hits" : 14532 ,
"percentage" : 31.8
},
{
"name" : "Android" ,
"version" : "14" ,
"hits" : 11234 ,
"percentage" : 24.6
},
{
"name" : "Windows" ,
"version" : "11" ,
"hits" : 10456 ,
"percentage" : 22.9
},
{
"name" : "macOS" ,
"version" : "Sonoma" ,
"hits" : 7234 ,
"percentage" : 15.8
}
],
"browsers" : [
{
"name" : "Chrome" ,
"version" : "120" ,
"hits" : 22345 ,
"percentage" : 48.9
},
{
"name" : "Safari" ,
"version" : "17" ,
"hits" : 15678 ,
"percentage" : 34.3
},
{
"name" : "Firefox" ,
"version" : "121" ,
"hits" : 4532 ,
"percentage" : 9.9
},
{
"name" : "Edge" ,
"version" : "120" ,
"hits" : 3123 ,
"percentage" : 6.8
}
],
"summary" : {
"mobilePercentage" : 56.2 ,
"desktopPercentage" : 39.9 ,
"topDevice" : "mobile" ,
"topOS" : "iOS 17" ,
"topBrowser" : "Chrome 120"
}
},
"meta" : {
"redirectId" : "redirect_abc123" ,
"period" : {
"start" : "2024-01-01T00:00:00Z" ,
"end" : "2024-01-31T23:59:59Z"
}
}
}
Use cases
Responsive design : Understand device distribution to prioritize mobile or desktop experiences
Browser testing : Identify which browser versions to test and support
OS compatibility : Ensure your destination pages work well on the most common operating systems
Performance optimization : Optimize for the most common device types
Feature detection : Determine which modern web features are safe to use based on browser distribution
App deep linking : Adjust mobile redirect strategies based on iOS vs Android distribution
Best practices
Mobile-first approach : With mobile traffic often exceeding 50%, ensure your redirects work well on mobile devices
Version awareness : Pay attention to browser and OS versions to avoid compatibility issues
Regular monitoring : Device trends change over time. Review this data quarterly
Cross-reference : Combine device data with geographic and time-series analytics for deeper insights