Download the PHP package aimeos/laravel-analytics-bridge without Composer

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

Laravel Analytics Bridge

A unified analytics bridge for Laravel providing a consistent API across multiple analytics providers such as Google Analytics, Matomo, and others.

Features

Installation

Install the driver package you need:

Configuration

Publish the configuration file:

This creates the ./config/analytics-bridge.php file:

Set your .env variables accordingly and don't forget to configure the ANALYTICS_DRIVER value using the name of the driver ("cloudflare", "google", or "matomo").

The value of GOOGLE_AUTH must be the string from the Service Account JSON key file encoded as base64. To do the encoding on the command line, use:

API Usage

Import the facade:

Page Statistics

Available are:

It returns arrays with one entry per day, country or URL:

PageSpeed Metrics

Returns:

Google Search Statistics

Returns:

Google Search Queries

Returns:

Google Index Status

Returns something like:

Implemnt new Driver

For a new analyics service (e.g. Foobar), create a new composer package, e.g. yourorg/laravel-analytics-foobar. Replace every occurrence of "yourorg" and "foobar" (in any case) with own vendor name and resp. the service name.

Use this composer.json as template:

Create a ./src/Foobar.php file that implements fetching the data from the analytics service. The skeleton class is:

Install your package using composer:

Register your driver in config/analytics-bridge.php, e.g.:

Optimize

The google/apiclient package contains classes for all Google APIs (currently over 300) but only two (SearchConsole and WebIndex) are required. To install only the required ones, insert this into your composer.json at the correct places:

When you run composer update afterwards, this will remove the unused services. Take a look into the Google client README for details.

License

This package is released under the LGPL-2.1+ License.


All versions of laravel-analytics-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0||^12.0||^13.0
google/apiclient Version ^2.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 aimeos/laravel-analytics-bridge contains the following files

Loading the files please wait ...