PHPackages                             philipnewcomer/linkify-tracking - 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. philipnewcomer/linkify-tracking

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

philipnewcomer/linkify-tracking
===============================

Linkifies package tracking numbers for DHL, FedEx, UPS, and USPS

2.0.0(4y ago)647.2k↓44.3%2[6 issues](https://github.com/philipnewcomer/linkify-tracking/issues)GPL-3.0PHP

Since May 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/philipnewcomer/linkify-tracking)[ Packagist](https://packagist.org/packages/philipnewcomer/linkify-tracking)[ RSS](/packages/philipnewcomer-linkify-tracking/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

linkify-tracking
================

[](#linkify-tracking)

Linkifies package tracking numbers for DHL, FedEx, Royal Mail (UK), UPS, and USPS.

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

[](#installation)

```
composer require philipnewcomer/linkify-tracking

```

Usage
-----

[](#usage)

First instantiate an instance of the library:

```
$linkifyTracking = new PhilipNewcomer\LinkifyTracking\LinkifyTracking;
```

### Get the tracking URL for a single tracking number

[](#get-the-tracking-url-for-a-single-tracking-number)

```
$linkifyTracking->getLinkUrl('12345678901234567890');
```

Result:

```
https://tools.usps.com/go/TrackConfirmAction?tLabels=12345678901234567890

```

### Get the link data for a single tracking number

[](#get-the-link-data-for-a-single-tracking-number)

```
$linkifyTracking->getLinkData('12345678901234567890');
```

Result:

```
[
    'carrier' => 'USPS',
    'url' => 'https://tools.usps.com/go/TrackConfirmAction?tLabels=12345678901234567890'
]
```

### Convert all tracking numbers in the given content to HTML links

[](#convert-all-tracking-numbers-in-the-given-content-to-html-links)

```
$content = '
Here is a tracking number: 12345678901234567890
And another tracking number: 12345678901234567890
';
$linkifyTracking->linkify($content)
```

Result:

```
Here is a tracking number: 12345678901234567890
And another tracking number: 12345678901234567890
```

Configuration
-------------

[](#configuration)

Configuration arguments may be passed to the `LinkifyTracking` constructor.

The following arguments may be provided:

- `linkAttributes`: An array of attributes which should be added to the generated HTML links

Example:

```
$linkifyTracking = new PhilipNewcomer\LinkifyTracking\LinkifyTracking([
    'linkAttributes' => [
        'class' => 'tracking-link',
        'target' => '_blank'
    ]
]);
```

Credits
-------

[](#credits)

Tracking number regular expressions for DHL, FedEx, UPS, and USPS are taken from .

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

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

Every ~428 days

Total

4

Last Release

1630d ago

Major Versions

1.1.1 → 2.0.02021-12-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/12f960edc40ea879fb20f1e250fcf74f951f231796423782a8aefd65fba4e5eb?d=identicon)[philipnewcomer](/maintainers/philipnewcomer)

---

Top Contributors

[![philipnewcomer](https://avatars.githubusercontent.com/u/1446874?v=4)](https://github.com/philipnewcomer "philipnewcomer (6 commits)")[![Nathanael-Shermett](https://avatars.githubusercontent.com/u/33186878?v=4)](https://github.com/Nathanael-Shermett "Nathanael-Shermett (5 commits)")[![jesusfbn](https://avatars.githubusercontent.com/u/15822179?v=4)](https://github.com/jesusfbn "jesusfbn (1 commits)")

### Embed Badge

![Health badge](/badges/philipnewcomer-linkify-tracking/health.svg)

```
[![Health](https://phpackages.com/badges/philipnewcomer-linkify-tracking/health.svg)](https://phpackages.com/packages/philipnewcomer-linkify-tracking)
```

###  Alternatives

[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[miracuthbert/laravel-royalty

A user points package for Laravel that can be used to give rewards, loyalty or experience points with real time support

825.1k](/packages/miracuthbert-laravel-royalty)[webidea24/magento2-module-pagebuilder-wysiwyg-html-editor

Magento 2 Module: Make the toggle-Button for HTML Editor available in PageBuilder elements

123.4k](/packages/webidea24-magento2-module-pagebuilder-wysiwyg-html-editor)

PHPackages © 2026

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