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 | |||||
Event | |||||
Ecommerce | |||||
Enhanced Ecommerce | @TODO | @TODO | |||
Social | |||||
Exceptions | |||||
... |
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:
- Google analytics: http://drupal.org/project/google_analytics
Modules that uses ga_push as dependency
- Commerce Google Analytics (2.x) : commerce_google_analytics
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:
-
Rules integration: send an event to Google Analytics when a new user registers: https://vimeo.com/89731618
- Example of use of Form Validate GA Push submodule with a webform and user login: https://vimeo.com/89739132
- Example of use of GA Push Browser submodule: sending events to Google Analytics when a Colorbox gallery is opened: https://vimeo.com/90479710
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.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - 1,064 sites report using this module
- Created by GeduR on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Pre-release version: 7.x-1.2-alpha1 released 1 Nov 2023 at 18:52 UTC
Development version: 7.x-1.x-dev updated 9 Jun 2023 at 06:54 UTC