coldtrick/analytics

Adds analytics tracking code (by Google or Piwik) to all Elgg pages

Installs: 864

Dependents: 1

Suggesters: 0

Security: 0

Stars: 5

Watchers: 1

Forks: 5

Open Issues: 0

Type:elgg-plugin

v3.1.1 2016-11-22 14:05 UTC

This package is auto-updated.

Last update: 2020-07-03 14:26:26 UTC


README

Elgg 3.1 Build Status Scrutinizer Code Quality Latest Stable Version License

Track the usage of your site by Google Analytics

Contents

  1. Credits

  2. Important updates

  3. Tracking of actions

  4. Tracking of events

  5. Flag admins

  6. Credits

Version 1.3

  1. Important updates

Version 1.3

  • It is possible to track Actions and Events of the Elgg system.
  • Tracking can be enabled in the plugin settings

Version 2.1

  • The plugin name changed to Analytics, as we now support both Google Analytics and Piwik analytics tracking.

Version 3.1

** Version 4.0**

  • Removed Piwik Support
  1. Tracking of Actions

All Actions of the Elgg system can be tracked and reported to Google Analytics as an extra pageview. An example of an action would be /action/login if this succeeds then a pageview /action/login/success is reported to Google Analytics. If it fails a pageview /action/login/failed will be reported to Google Analytics.

With this extra information it is possible to create and track conversions

FOR DEVELOPERS

There is a plugin hook to prevent the tracking of actions: trigger_plugin_hook("track_action", "analytics", array("action" => $action)). If you return false on this hook the action will not be tracked.

  1. Tracking events

All events of the Elgg system can be tracked an reported to Google Analytics as an event. An example would be the creation of an user which will be reported as _trackEvent('user', 'create', '')

With this extra information it is possible to further follow the usage of your site.

FOR DEVELOPERS

There is a plugin hook to prevent the tracking of events: trigger_plugin_hook("track_event", "analytics", array("category" => $category, "action" => $action, "label" => $label)) If you return false on this hook the action will not be tracked.

  1. Flag admins

It is possible to set some extra tracking data in case of an adminitrator. This will allow you to filter the administrators out of your site usage or do other stuff.

When enabled an administrator will be flagged with a customVar 'role' which will be set to 'admin' = 1