Download the PHP package victord11/laravel-utm without Composer

On this page you can find all versions of the php package victord11/laravel-utm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-utm

This package is an updated fork of adzbuck/laravel-utm

Keeps track of UTMs and/or other parameters

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This package allows you to easily track first and last touch query parameters and headers via session. You can then easily access these parameters so you can add them to a form submission or a link to another domain you track.

Installation

You can install the package via composer:

The package works via a middleware that needs to be added to the web stack in your kernel.php file. Make sure to register this middleware after the StartSession middleware.

To configure the tracked parameters or how they're mapped on the URL parameters, you can publish the config file using:

This is the contents of the published config file:

Usage

There are three methods of tracking:

getFirstTouch
This will get the parameters from the users first visit.
getLastTouch
This will get the parameters from the users last visit.
getCurrent
This will get the parameters from the current request.

The easiest way to retrieve the tracked parameters is by resolving the ParameterTracker class:

You can also decorate an existing URL with the tracked parameters. This is useful to forward analytics to another domain you're running analytics on.

The example uses three requests:

decorateUrl/@trackedUrl

This does not use the session tracking, it simply uses the params provided.

decorateUrlFromFirstTouch/@trackedUrlFromFirstTouch

This adds the parameters from the users first visit. You can also add extra params via an array as the second parameter.

decorateUrlFromLastTouch/@trackedUrlFromLastTouch

This adds the parameters from the users Last visit. You can also add extra params via an array as the second parameter.

decorateUrlFromCurrent/@trackedUrlFromCurrent

This adds the parameters from the users Last visit. You can also add extra params via an array as the second parameter.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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


All versions of laravel-utm with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^9.0|^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package victord11/laravel-utm contains the following files

Loading the files please wait ....