Download the PHP package zyanez/user-tracker without Composer
On this page you can find all versions of the php package zyanez/user-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zyanez/user-tracker
More information about zyanez/user-tracker
Files in zyanez/user-tracker
Package user-tracker
Short Description Laravel package for retrieving user browser, operating system, and device type.
License MIT
Informations about the package user-tracker
user-tracker 🕵️♀️
Laravel package for retrieving user browser, operating system, and device type.
Features 🛠️
- Easily obtain the user's operating system, browser, preferred language, and device type 🖥️.
- User-agent parsers for quickly understanding user information such as the above, preferred language, browser, etc. 🕵️♂️
Quickstart 🚀
To install user-tracker and use it, follow these steps:
- In your Laravel project, run the command
composer require zyanez/user-tracker
. -
Add the following line at the top of the PHP file where you intend to utilize this code:
- Use the commands below in documentation!
Documentation
Initialization
To start gathering information about the user's environment using the UserTracker class, you must first create an instance of it:
Get user's browser
This method identifies the user's web browser by examining the User-Agent header sent by the browser:
Get user's OS
Similarly, this method identifies the user's operating system by analyzing the User-Agent header:
Get user's device type
This method determines the type of device the user is using, whether it's a desktop, mobile, or tablet:
Get user's prefered language
Lastly, this method retrieves the user's preferred language based on the Accept-Language header sent by their browser:
License 📝
This project is licensed under the MIT License.
Contribution 🤝
If you find a bug or have any feature suggestions to enhance the project, feel free to contribute!