Download the PHP package spatie/analytics-reports without Composer

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

🚨 THIS PACKAGE HAS BEEN ABANDONED 🚨

We don't use this package anymore in our own projects and cannot justify the time needed to maintain it anymore. That's why we have chosen to abandon it. Feel free to fork our code and maintain your own copy.

Retrieve data from Google Analytics

Latest Stable Version Total Downloads License

This is an opinionated Laravel 4 package to retrieve Google Analytics data.

If you're using Laravel 5, take a look at this package.

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

Postcardware

You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

Installation

This package can be installed through Composer.

You must install this service provider.

This package also comes with a facade, which provides an easy way to call the the class.

Although the composer.json of this package specifies that "google/apiclient" AND "thujohn/analytics" must be pulled in as well, it sometimes fails to do so. If you encouter this problem as well include these lines in your composer.json as well:

You can publish the config file of the package using artisan

After the config file has been published you'll manually have to move it to your app's config-folder. (Hopefully this step won't be necessary in a next version)

To move the config file copy the file from

and paste it to your folder and rename it to

In the config file you can specify two values:

Internally this package uses thujohn/analytics-l4 to authenticate with Google. So in order to use this package you must also follow their installation instructions.

Usage

When the installation is done you can easily retrieve Analytics data. Mostly all methods will return an Illuminate\Support\Collection-instance.

Here is an example to retrieve visitors and pageview data for the last seven days.

Here's another example to get the 20 most visited pages of the last 365 days

Provided methods

Visitors and Pageviews

These methods return a Collection with columns "date", "vistors" and "pageViews". When grouping by yearMonth, the first column will be called "yearMonth".

Keywords

These methods return a Collection with columns "keyword" and "sessions".

Referrers

These methods return a Collection with columns "url" and "pageViews".

Browsers

These methods return a Collection with columns "browser" and "sessions".

If there are more used browsers than the number specified in maxResults, then a new resultrow with browser-name "other" will be appended with a sum of all the remaining browsers.

Most visited pages

These methods return a Collection with columns "url" and "pageViews".

All other Google Analytics Queries

To perform all other GA queries use . Google's Core Reporting API provides more information on on which metrics and dimensions might be used.

Convenience methods

can be used to get the site id for the given url

About Spatie

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.


All versions of analytics-reports with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 4.*|5.*
google/apiclient Version 1.1.*
thujohn/analytics Version ^1.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 spatie/analytics-reports contains the following files

Loading the files please wait ....