Download the PHP package nanuc/laravel-track without Composer

On this page you can find all versions of the php package nanuc/laravel-track. 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-track

This package adds content marketing tracking and A/B tests to your app. The package tries to find a balance between privacy and useful data. All users will be anonymized, so by default there is no way to trace back a user.

Every user receives a random string which is stored in a cookie to identify them on the following visits.

Installation

composer require nanuc/laravel-track

Publish config (optional)

php artisan vendor:publish --provider="Nanuc\LaravelTrack\LaravelTrackServiceProvider" --tag=config

You can configure a separate database connection.

Run migrations

Run php artisan migrate to create the necessary tables.

Usage

Middleware

Just add the middleware track to the routes you want to track.

UTM

The package tracks the utm_campaign and utm_source query parameters. Nothing you need to do here.

Goals

Set reached goals with Tracker::goal('goalName');. You don't need to define the goals - they will be created on the first use.

If the route where you attach a goal is not tracked (e.g. in Livewire routes) the goal will be attached to the last known page view for this visitor.

Goals in views

You can set goals in views too. They will be reached when the place where the component was placed gets visible in the view port. This can be used e.g. to measure if an A/B tested heroshot gets scrolls further down the page.

Just use <track::goal goal="goalName" /> in your blade view. For this to work you need to have a stack scripts in your layout - the name can be configured (laravel-track.goals.component.stack-name).

Page name

As Laravel Livewire uses the same routes for different actions it might be useful to give a page a name. You can do this with Tracker::page('pageName');.

A/B tests

Use the following syntax in your blade views:

You don't need to define the A/B tests' name and options - they will be created on the first use. Options will be rotated on each visit.

Dashboard

This package offers a module for LaravelAdmin. To use it make sure to install LaravelAdmin first. Afterwards add \Nanuc\LaravelTrack\LaravelAdmin\LaravelAdmin::class to config/laravel-admin:


All versions of laravel-track with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
jenssegers/agent Version ^2.6
torann/geoip Version ^3.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 nanuc/laravel-track contains the following files

Loading the files please wait ....