Skip to content

Famdirksen/Laravel-UTM-URLs

Repository files navigation

Laravel UTM Urls

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Install

Via Composer

$ composer require famdirksen/laravel-utm-urls

Usage

Add the \Famdirksen\LaravelUTMUrls\Middleware\SetUTMUrls::class to your app/Http/Kernel.php. Thisway all the url's on your site will have the UTM attributes from the config file (utm-urls.php) added.

To disable the UTM attributes appended to a url on specific routes, you can add the follow middleware to the route or group: \Famdirksen\LaravelUTMUrls\Middleware\DisableUTMUrls::class. This will set the header x-do-not-append-campagne so it won't append the UTM attributes.

You can publish the config file with:

php artisan vendor:publish --provider="Famdirksen\LaravelUTMUrls\LaravelUTMUrlsServiceProvider"

Testing

$ composer test

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Add UTM attributes to all outgoing urls.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages