Download the PHP package happyr/google-analytics-bundle without Composer

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

Google Analytics Bundle

Latest Version Build Status Code Coverage Quality Score Total Downloads

GoogleAnalyticsBundle is a Symfony2 bundle that helps you to push data to Google Analytics. It could be data like pageview, events etc. It is a bundle implementation of the Measurement Protocol

This is not a library to pull data from Google analytics. That feature is deprecated from the classic-analytics branch. The master branch and version 3 and above will be supporting Google analytics universal.

Special feature

This bundle has a special feature. Say that you want to post data to Analytics. You want to post an event every time someone downloads a file. You may do that from the server like any other library. When looking at the reports you will find that you are missing the information about the actual user for the download event. You can not use a segment to find out which referal the user came from.

This bundle helps you with just that. Before we submit any data we look at the _ga cookie to find the user's clientId. So now you may use segments and advanced queries to analytics and you will get the expected result.

Usage

Read the documentation of the protocol.

Installation

Install with composer.

Step 2: Register the bundle

Register the bundle in the AppKernel.php

Step 3: Configure the bundle

Step 4: Provide a HTTP client and message factory service.

You need to provide two services to that know how to create and send message factories. The services must implement Http\Message\RequestFactory and Http\Client\HttpClient. If you use HTTPlugBundle this will be taken care of automatically. You will aslo get some nice logging features.

Fetching data

If you want to fetch data from Google Analytics you must install and configure GoogleSiteAuthenticatorBundle. Read its documentaion and then configure the analytics bundle with a client service and a view id. The view id is found in the admin section on Google analytics. Go to Admin > Account > Property > View > View settings.

You may then run the following code to get the page views for /example-page.


All versions of google-analytics-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
psr/cache Version ^1.0
cache/void-adapter Version ^1.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
symfony/config Version ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1
symfony/dependency-injection Version ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1
symfony/event-dispatcher Version ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1
symfony/http-foundation Version ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1
symfony/http-kernel Version ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1
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 happyr/google-analytics-bundle contains the following files

Loading the files please wait ....