PHPackages                             kaantanis/url-tracker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kaantanis/url-tracker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kaantanis/url-tracker
=====================

Laravel URL Tracker

v1.0.0(3y ago)0621[3 PRs](https://github.com/KaanTanis/url-tracker/pulls)1MITPHPPHP ^8.1

Since Feb 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/KaanTanis/url-tracker)[ Packagist](https://packagist.org/packages/kaantanis/url-tracker)[ Docs](https://github.com/kaantanis/url-tracker)[ RSS](/packages/kaantanis-url-tracker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (14)Versions (5)Used By (1)

Laravel URL Tracker
===================

[](#laravel-url-tracker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b2f7b571ef53b034b82b07f373824169a99027d3232367d77ed857ff5dc50e78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61616e74616e69732f75726c2d747261636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaantanis/url-tracker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3464a18e4fae91a6e3d37ca8e51bd9a26616c770d494fe509c23c2f88871c12a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b61616e74616e69732f75726c2d747261636b65722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kaantanis/url-tracker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d86cadfcef72908d2621625204044285b44238972a4eb2b97f53efb9efbbc142/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b61616e74616e69732f75726c2d747261636b65722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/kaantanis/url-tracker/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/e7d5d167e0ba7cdc7b78756a305ba6dd4a22709852f1ab7a5c893880fd7ee1db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61616e74616e69732f75726c2d747261636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaantanis/url-tracker)

If a user create short url, this package will track the url and store the data in database.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kaantanis/url-tracker
```

You can publish and run the migrations and config with:

```
php artisan install:url-tracker
```

This is the contents of the published config file:

```
return [
    'prefix' => 'url-tracker', // example.com/url-tracker/QSGHG2
    'check-last-visit-minute' => 30 // check last 30 min same user visited this url. if not, increase view count
];
```

Usage
-----

[](#usage)

```
// Send post request to this url with tracked_url parameter
// example.com/url-tracker/generate-url (route name is url-tracker.generate-url)

Http::post(route('url-tracker.generate-url'), [
    'tracked_url' => 'https://google.com'
]);

// This return a string url path like this with a unique code
// example.com/url-tracker/QSGHG2

// If any visitor visit this url, user redirect to tracked_url
// and visitor data will be stored in database
```

Which data will be stored in database?
--------------------------------------

[](#which-data-will-be-stored-in-database)

```
// main table
[
    'created_by' => auth()->id() ?? null,
    'url' => $request->tracked_url,
    'placeholder' => $uniqueCode
]

// and log table
[
    'url_tracker_table_id' => $urlFound->id,
    'ip_address' => request()->ip(),
    'user_agent' => request()->userAgent(),
    'referer' => request()->headers->get('referer'),
    'method' => request()->method(),
]
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Kaan](https://github.com/KaanTanis)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80b94fe7e34ede0d9379c96c6445536fae9c7820c7bbc4519e1c9759ffcf9137?d=identicon)[kaantanis](/maintainers/kaantanis)

---

Top Contributors

[![KaanTanis](https://avatars.githubusercontent.com/u/64961969?v=4)](https://github.com/KaanTanis "KaanTanis (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laravelurl-shortenerurl-statsurl-trackerlaravelKaanTanisurl-tracker

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kaantanis-url-tracker/health.svg)

```
[![Health](https://phpackages.com/badges/kaantanis-url-tracker/health.svg)](https://phpackages.com/packages/kaantanis-url-tracker)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
