This module extends the functionality of Google Analytics module.

GA Push offers an API to enqueue informations that are sent GA servers, and three submodules to track browser events (using jQuery), form validation errors and log exceptions.

So, you can enable submodules, config and track, or you can use the PHP API to enqueue your own events that will be sent to Google Analytics servers.

UNIVERSAL ANALYTICS

https://developers.google.com/analytics/devguides/collection/analyticsjs/

https://developers.google.com/analytics/devguides/collection/protocol/v1...

Requeriments: Google Analytics 7.x-2.x https://drupal.org/project/google_analytics

- UTMP-JS: It sends the data on client-side (next page load).
- UTMP-PHP: It sends the data on server-side.

CLASSIC ANALYTICS

https://developers.google.com/analytics/devguides/collection/gajs/

Requeriments: Google Analytics 7.x-1.x https://drupal.org/project/google_analytics

- JS: It sends the data on client-side (next page load).

- PHP: It sends the data on server-side. One of these libraries are required:

- SSGA: Deprecated library(2009) to PHP 5.2+ versions
You don't need to download this library, a modified version of this library
that implements curl is included on this module.
Forked from: http://code.google.com/p/serversidegoogleanalytics/

- PHP-GA: Recomended library only for versión 5.3+
Requires PHP 5.3 as namespaces and closures are used.
Download from: https://github.com/thomasbachem/php-ga

Supported Push types

You can also implement your own methods to comunicate to GA.

Google nowadays let you communicate to analytics with the current push types:

Push types Analytics.js - JS (UT) Measurement Protocol - PHP (UTMP) Classic - JS Classic - PHP (php-ga) Classic - PHP (ssga) [DEPRECATED]
Pageview Yes Yes
Event Yes Yes Yes Yes Yes
Ecommerce Yes Yes Yes Yes
Enhanced Ecommerce @TODO @TODO
Social Yes Yes
Exceptions Yes Yes
...

To the first snapshot of this module we will focus on events an ecommerce product types, but as soon as posible we will cover all.

Features:

  • Rules integration: integration with: events, pageviews, social and exceptions.
  • Client and Server side tracking. You can choose which mode better fit your needs!

Submodules:

  • Ga push Browser: send all jQuery events you set to analytics.
  • Ga push form validate: it sends to analytics form validate errors of the forms you set.
  • Ga push log:Simple example module for log exception tracking with rules on watchdog log event.

Dependencies:

Modules that uses ga_push as dependency

Please let us know about new modules that uses GA Push!

Video tutorials

Watch those two minute videotutorials to see the module in action and configuration examples:

Drupal 8

GA Push main module, the one that exposes the API to send info to Google Analytics, is functional since Drupal 8 release.

Integration with Rules is a little bit rought. See #2707971: Rules integration: method can't be selected. Also Rules Actions params are very spartan, but this is due Rules current status.

Example submodule GA Push Log has been removed because Rules doesn't provide watchdog content. See #2707979: Bring back GA Push Log submodule.

GA Push Browser has been removed and it's not going to be ported at the moment.

GA Push Form Validate is fully functional.

Drupal 6 support

Mantainers can't develop the 6.x branch but toemaz has posted a port to Drupal 6, see this issuse: #2227399: D6 backport with PHP-GA and UTMP support. If you need a Drupal 6 GA Push release please install the 6.x version zip attached to this issue and report back your results to the issue.

Credits
Initial development by GeduR.
Development of this module is sponsored by Metadrop.

Supporting organizations: 

Project information

Releases