Registry / utility / matomo-device-detector

matomo-device-detector

JSON →
library6.5.1phppackagistunverified

The Universal Device Detection library that parses User Agents and detects devices, clients, operating systems, and brands.

composer require matomo/device-detector
INSTALL
IMPORT
SIG · MATOMO-DEVICE-DETE
M
matomo-device-detector
utilityphpv6.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DeviceDetector
use DeviceDetector\DeviceDetector;

Parse a user agent string and detect the device type.

use DeviceDetector\DeviceDetector; $dd = new DeviceDetector('Mozilla/5.0 (Linux; Android 10; SM-G975F)'); $dd->parse(); $device = $dd->getDeviceName(); // 'smartphone' echo $device;
Debug
Known issues
gotchaThe library may not detect all devices correctly with incomplete user agents.
fix
Ensure you provide a full user agent string for accurate detection.
affects: >=6.0.0
Upgrade
Version history
6.5.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
matomo-device-detector — pip install matomo-device-detector · libregistry