Download the PHP package fsuuaas/utm-tracker without Composer

On this page you can find all versions of the php package fsuuaas/utm-tracker. 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 utm-tracker

fsuuaas/utm-tracker

Structured UTM capture and persistence for Laravel apps: a first-party capture script with proper multi-touch attribution, a Blade component that populates any form automatically, and a polymorphic UtmRecord model that attaches itself to whatever your app creates.

What it does

Requirements

PHP 8.1+, Laravel 10 / 11 / 12.

Install

If you're consuming it via a VCS repository entry instead of Packagist:

Frontend-only usage

For an app that only captures and submits attribution (forms POST to an external API, e.g. cc-website → breeze10):

<x-utm-tracker::fields /> renders one hidden input per field the browser is responsible for (utm_source, first_utm_source, mcf_utm_source, referrer, landing_page, session_count, …). name always stays plain and unprefixed — only id takes the prefix — so the payload your backend receives is unaffected by which form on the page it came from.

ip_address and user_agent are deliberately never rendered as hidden inputs: they're resolved server-side from the request, so a submitter can't forge them.

Backend usage

A model using both concerns records a UtmRecord the moment it's created — no controller changes needed. Two accessors are available:

To capture explicitly instead of (or in addition to) the automatic hook:

Fsuuaas\UtmTracker\Traits\HasUtm and Traits\SavesUtm still exist as thin aliases over the Concerns\ versions above, so an app already using the old namespace keeps working without touching its models.

An app that already has a utm_records table

Point the package at your existing model instead of publishing the create-table migration, and add indexing separately:

Querying

Scopes are named for what they filter (source, medium, campaign, term, content, gclid, ip, landingPage, userAgentLike, between, attributed) — not withSource() etc., since in Eloquent with* means eager-loading.

Config

defer_until_commit matters for tests: RefreshDatabase wraps everything in a transaction that never commits, so set this to false in phpunit.xml if your tests assert on utm_records rows.

Adding a field

The field list is defined once, in the registry — not duplicated across the migration, the model, the Blade view and the JS config. Extend it from a service provider:

A registered field with no matching column stays uncaptured on a database that hasn't migrated for it yet. UtmSchema::missingColumns() reports what's out of sync so you know when a migration is needed.

Migrating from an older cookie

The capture script upgrades two prior formats in place, on first read, and never deletes the old cookie — so anything else still reading it keeps working during the transition:

List any cookie names you want upgraded-from in legacy_cookies.

JS API

Testing

License

MIT.


All versions of utm-tracker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.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 fsuuaas/utm-tracker contains the following files

Loading the files please wait ...