Download the PHP package p1ho/google-analytics-api without Composer

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

README

Build Status Coverage Status

Table of Content

Introduction

Google has a PHP API Library that allows making requests to Google APIs from a PHP execution, including Reporting API v4 which enables access to Google Analytics data. However, while the library is quite powerful, it can be unintuitive as users have to create objects from the library (Google's Tutorial for PHP), which takes a lot of digging in the documentation.

As someone who had to use this library extensively, I wanted something that's more intuitive. Specifically, if I'm already familiar with Google Analytics and the dimensions and metrics available, I should immediately be able to make requests and get my data; and thus this package was born.

Features

Requirements

Installation

This package is available through Composer, and can be installed by entering:

Usage

If needed, you can also add a filter expression

Note: The filter expression is the reason why I still require the ga: prefixes, if I had taken it out, it could make writing the filters expression confusing. I could also make it so the getData() method receives optional parameters array $dimensionFilters and array $metricFilters, but even that could introduce confusion. If this is useful to anyone, please open an issue and let me know your preference, and why.

Report Structure

Note: Empty rows and 0 metric values are not displayed to minimize memory usage. Since users have the list of metrics used to make the requests, the 0 can be implied.

Development

Contributors

p1ho

All versions of google-analytics-api with dependencies

PHP Build Version
Package Version
Requires google/apiclient Version ^2.2
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 p1ho/google-analytics-api contains the following files

Loading the files please wait ....