charlesportwoodii/eanalytics

EAnalytics is a Analytics.js wrapper for Yii Framework

Installs: 1 558

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 4

Forks: 0

Open Issues: 0

Language:JavaScript

1.1.5 2015-01-22 17:20 UTC

This package is auto-updated.

Last update: 2024-10-26 05:36:30 UTC


README

EAnalytics is a Yii Framework wrapper for Analytics.js Library. Rather than loading in a dozen different extensions for each analytics service you want to use, this extension allows you to specify various tracking providers in a single config file and call various methods via a single interface.

Installation

EAnalytics can be installed via composer. Add the following to your composer.json require section.

"charlesportwoodii/eanalytics": "1.1.5"

Then run composer update

Configuring

Clone the repository to your extensions folder and add the following to your config/main.php:

'preload' => array('EAnalytics'),
'components' => array(
	'EAnalytics' => array(
		'class' => 'ext.analytics.EAnalytics',
		'lowerBounceRate' => false,
		'providers' => array(
			// List of Providers
		)
	)
)

The extension must be preloaded if you want analytics.js to load up on page load

lowerBounceRate

Some analytics services treat any user who only visits a single page as a "bounce". This setting fires off 3 events 15s, 30s, and 60s after the initial page to load which can help determine if a user only needed to visit your site for a single page or actually bounced.

Setting this value to "true" will eanble this feature. By default it is disabled.

providers

This is an array of all the providers that you wish to enable. This array is transformed into JSON and injected into analytics.initialize() on page load.

You may view the list of available providers at segment.io's integration page

LICENSE

(The MIT License)

Copyright (c) 2013-2015 Charles R. Portwood II charlesportwoodii@ethreal.net

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.