PHPackages                             sibapp/footprints - 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. sibapp/footprints

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

sibapp/footprints
=================

A simple registration attribution tracking solution for Laravel 5.2+ (UTM Parameters and Referrers)

0.2.9(8y ago)010MITPHPPHP ~5.5|~7.0

Since Feb 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Sibappco/Footprints)[ Packagist](https://packagist.org/packages/sibapp/footprints)[ Docs](https://github.com/kyranb/footprints)[ RSS](/packages/sibapp-footprints/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (5)Versions (24)Used By (0)

🐾 Footprints for Laravel 5.2+ (UTM and Referrer Tracking)
=========================================================

[](#feet-footprints-for-laravel-52-utm-and-referrer-tracking)

[![Footprints for Laravel 5.2+ (UTM and Referrer Tracking)](readme-header.jpg)](readme-header.jpg)

[![Latest Version on Packagist](https://camo.githubusercontent.com/672fd674b3dac5bbd4a733b9aaaadeda16d3eab322932ad7ca2e9e4c88ceb87f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b7972616e622f666f6f747072696e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kyranb/footprints)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1cde803788c77664382da473dd0cd12513a5d03ff7c9df762b6ec2d9352fa73a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b7972616e622f666f6f747072696e74732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/kyranb/footprints)[![Total Downloads](https://camo.githubusercontent.com/b1eae25649058b2b4daa44e9b003217e26bcd792fd7b1c94e24dd056942ee641/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b7972616e622f666f6f747072696e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kyranb/footprints)

Footprints is a simple registration attribution tracking solution for Laravel 5.2+

> “I know I waste half of my advertising dollars...I just wish I knew which half.” ~ *Henry Procter*.

By tracking where user signups (or any other kind of registrations) originate from you can ensure that your marketing efforts are more focused.

Footprints makes it easy to look back and see what lead to a user signing up.

Install
-------

[](#install)

Via Composer

```
$ composer require kyranb/footprints
```

Add the service provider and (optionally) alias to their relative arrays in config/app.php:

```
    'providers' => [
        ...
        Kyranb\Footprints\FootprintsServiceProvider::class,
    ],

...

    'aliases' => [
        ...
        'Footprints'   => Kyranb\Footprints\FootprintsFacade::class,
    ],
```

Publish the config and migration files:

```
php artisan vendor:publish --provider="Kyranb\Footprints\FootprintsServiceProvider"
```

Add the `TrackRegistrationAttribution` trait to the model you wish to track attributions for. For example:

```
namespace App;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Kyranb\Footprints\TrackRegistrationAttribution;

class User extends Model
{
    use Authenticatable, TrackRegistrationAttribution;

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'users';

}
```

Go over the configuration file, most notably the model you wish to track:

connection name (optional - if you need a separated tracking database):

`'connection_name' => 'mytrackingdbconnection'`

model name:

`'model' => 'App\User'`

authentication guard:

`'guard' => 'web'`

the column name:

`'model_column_name' => 'user_id'`

and attribution duration (in seconds)

`'attribution_duration' => 2628000`

also you can define some route what you don't want to track:

`'landing_page_blacklist' => ['genealabs/laravel-caffeine/drip', 'admin']`

if you want to use on multiple subdomain with a wildcard cookie, you can set your custom domain name:

`'cookie_domain' => .yourdomain.com`

this boolean will allow you to write the tracking data to the db in your queue (optional):

`'async' => true`

Add the `\Kyranb\Footprints\Middleware\CaptureAttributionDataMiddleware::class` middleware to `App\Http\Kernel.php` after the `EncryptCookie` middleware like so:

```
    /**
     * The application's global HTTP middleware stack.
     *
     * These middleware are run during every request to your application.
     *
     * @var array
     */
    protected $middleware = [
        \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
        \App\Http\Middleware\EncryptCookies::class,
        \Kyranb\Footprints\Middleware\CaptureAttributionDataMiddleware::class,
    ];
```

Usage
-----

[](#usage)

#### How does Footprints work?

[](#how-does-footprints-work)

Footprints tracks the UTM parameters and HTTP refererers from all requests to your application that are sent by un-authenticated uers. Not sure what UTM parameters are? [Wikipedia](https://en.wikipedia.org/wiki/UTM_parameters) has you covered:

> UTM parameters (UTM) is a shortcut for Urchin Traffic Monitor. This text tags allow users to track and analyze traffic sources in analytical tools (f.e. Google Analytics). By adding UTM parameters to URLs, you can identify the source and campaigns that send traffic to your website. When a user clicks a referral link / ad or banner, these parameters are sent to Google Analytics (or other analytical tool), so you can see the effectiveness of each campaign in your reports

> ###### Here is example of UTM parameters in a URL: [www.wikipedia.org/?utm\_source=domain.com&amp;utm\_medium=banner&amp;utm\_campaign=winter15&amp;utm\_content=blue\_ad&amp;utm\_term=headline\_v1](http://www.wikipedia.org/?utm_source=domain.com&utm_medium=banner&utm_campaign=winter15&utm_content=blue_ad&utm_term=headline_v1)
>
> [](#here-is-example-of-utm-parameters-in-a-url-wwwwikipediaorgutm_sourcedomaincomutm_mediumbannerutm_campaignwinter15utm_contentblue_adutm_termheadline_v1)

\####### There are 5 dimensions of UTM parameters:

- utm\_source = name of the source (usually the domain of source website)
- utm\_medium = name of the medium; type of traffic (f.e. cpc = paid search, organic = organic search; referral = link from another website etc.)
- utm\_campaign = name of the campaign, f.e. name of the campaign in Google AdWords, date of your e-mail campaign, etc.
- utm\_content = to distinguish different parts of one campaign; f.e. name of AdGroup in Google AdWords (with auto-tagging you will see the headline of - your ads in this dimension)
- utm\_term = to distinguish different parts of one content; f.e.keyword in Google AdWords

#### What data is tracked for each visit?

[](#what-data-is-tracked-for-each-visit)

- `landing_page`
- `referrer_url`
- `referrer_domain`
- `utm_source`
- `utm_campaign`
- `utm_medium`
- `utm_term`
- `utm_content`
- `created_at` (date of visit)

##### Get all of a user's visits before registering.

[](#get-all-of-a-users-visits-before-registering)

```
$user = User::find(1);
$user->visits;
```

##### Get the attribution data of a user's initial visit before registering.

[](#get-the-attribution-data-of-a-users-initial-visit-before-registering)

```
$user = User::find(1);
$user->initialAttributionData();
```

##### Get the attribution data of a user's final visit before registering.

[](#get-the-attribution-data-of-a-users-final-visit-before-registering)

```
$user = User::find(1);
$user->finalAttributionData();
```

Change log
----------

[](#change-log)

Please see the commit history for more information what has changed recently.

Testing
-------

[](#testing)

Haven't got round to this yet - PR's welcome ;)

```
$ composer test
```

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

[](#contributing)

If you run into any issues, have suggestions or would like to expand this packages functionality, please open an issue or a pull request :)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.4% 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 ~32 days

Recently: every ~77 days

Total

22

Last Release

3054d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fa72ec88ecd099cdcc983cf4e8f3137c61b2832630a7c6ba4684ad17faf56b2f?d=identicon)[roboticsexpert](/maintainers/roboticsexpert)

---

Top Contributors

[![kyranb](https://avatars.githubusercontent.com/u/5426926?v=4)](https://github.com/kyranb "kyranb (31 commits)")[![gyurobenjamin](https://avatars.githubusercontent.com/u/3200573?v=4)](https://github.com/gyurobenjamin "gyurobenjamin (11 commits)")[![henriklippke](https://avatars.githubusercontent.com/u/4739705?v=4)](https://github.com/henriklippke "henriklippke (7 commits)")[![JeroenJochems](https://avatars.githubusercontent.com/u/1180505?v=4)](https://github.com/JeroenJochems "JeroenJochems (5 commits)")[![JayBizzle](https://avatars.githubusercontent.com/u/340752?v=4)](https://github.com/JayBizzle "JayBizzle (2 commits)")[![raoulduke](https://avatars.githubusercontent.com/u/881473?v=4)](https://github.com/raoulduke "raoulduke (1 commits)")[![roboticsexpert](https://avatars.githubusercontent.com/u/9366277?v=4)](https://github.com/roboticsexpert "roboticsexpert (1 commits)")

---

Tags

trackingUTMattribution trackingfootprintsutm parametersuser tracking

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sibapp-footprints/health.svg)

```
[![Health](https://phpackages.com/badges/sibapp-footprints/health.svg)](https://phpackages.com/packages/sibapp-footprints)
```

###  Alternatives

[kyranb/footprints

A simple registration attribution tracking solution for Laravel (UTM Parameters and Referrers)

207354.2k](/packages/kyranb-footprints)[zumba/amplitude-php

PHP SDK for Amplitude

409.5M5](/packages/zumba-amplitude-php)[php-coord/php-coord

PHPCoord is a PHP library to aid in handling coordinates. It can convert coordinates for a point from one system to another and also calculate distance between points.

110914.5k12](/packages/php-coord-php-coord)[cornford/googlitics

An easy way to integrate Google Analytics with Laravel.

3310.2k](/packages/cornford-googlitics)[suarez/laravel-utm-parameter

A little helper to store and handle utm-parameter

1513.8k](/packages/suarez-laravel-utm-parameter)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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