Download the PHP package cornford/googlitics without Composer

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

An easy way to integrate Google Analytics with Laravel

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality

For Laravel 5.x, check version 2.5.0

For Laravel 4.x, check version 1.1.0

Think of Googlitics as an easy way to integrate Google Analytics with Laravel, providing a variety of helpers to speed up the utilisation of application tracking. These include:

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require cornford/googlitics.

"require": {
    "cornford/googlitics": "3.*"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes, the next step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.

Cornford\Googlitics\AnalyticsServiceProvider::class,

The next step is to introduce the facade. Open app/config/app.php, and add a new item to the aliases array.

'Analytics'         => Cornford\Googlitics\Facades\AnalyticsFacade::class,

Finally we need to introduce the configuration files into your application/

php artisan vendor:publish --provider="Cornford\Googlitics\AnalyticsServiceProvider" --tag=googlitics

That's it! You're all set to go.

Configuration

You can now configure Googlitics in a few simple steps. Open app/config/packages/cornford/googlitics/config.php and update the options as needed.

Usage

It's really as simple as using the Analytics class in any Controller / Model / File you see fit with:

Analytics::

This will give you access to

Track Page

The trackPage method allows a page to be tracked, with optional parameters for page, title and track type.

Analytics::trackPage();
Analytics::trackPage('Homepage', 'Homepage Title');
Analytics::trackPage('Homepage', 'Homepage Title', Analytics::TYPE_PAGEVIEW);

Track Screen

The trackScreen method allows a screen in an application to be tracked, with a parameter for the screen name.

Analytics::trackScreen('Homepage');

Track Event

The trackEvent method allows an event to be tracked, with parameters for category, and action option parameters for label and value.

Analytics::trackEvent();
Analytics::trackEvent('User', 'Sign up');
Analytics::trackEvent('User', 'Sign up', 'User - Sign up', date());

Track Transaction

The trackTransaction method allows an ecommerce transaction to tracked, with parameters for identifier, and an optional options parameter for affiliation, revenue, shipping, tax in a key value array format.

Analytics::trackTransaction('123');
Analytics::trackTransaction('123', ['affiliation' => 'Clothing', 'revenue' => '12.99', 'shipping' => '7.99', 'tax' => '1.59']);

Track Item

The trackItem method allows an ecommerce item to tracked, with parameters for identifier and name, and an optional options parameter for sku, category, price, quantity in a key value array format.

Analytics::trackItem('123', 'Socks');
Analytics::trackItem('123', 'Socks', ['sku' => 'PR123', 'category' => 'Clothing', 'price' => '7.99', 'quantity' => '1']);

Track Metric

The trackMetric method allows a metric to be tracked, with parameters for category, and an options parameter in a key value array format.

Analytics::trackMetric('Metric', ['metric1' => 100]);

Track Exception

The trackException method allows application exceptions to be tracked, with optional parameters for description and fatality.

Analytics::trackException();
Analytics::trackException('500 Server Error', true);

Track Custom

The trackCustom method allows custom items to be tracked with a single parameter for the custom item.

Analytics::trackCustom("ga('custom', 'parameter');");

Render

The render method allows all tracking items to be rendered to the page, this method can be included in Views or added as controller passed parameter.

Analytics::render();

License

Googlitics is open-sourced software licensed under the MIT license


All versions of googlitics with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2
ext-json Version *
illuminate/support Version ^6.0
illuminate/view Version ^6.0
laravel/framework Version ^6.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 cornford/googlitics contains the following files

Loading the files please wait ...