google-analytics Widget for including GA counter code to your site

Usage ΒΆ

1) Place EGoogleAnalyticsWidget.php to your_project_dir/protected/extensions/widgets/googleAnalytics/EGoogleAnalyticsWidget.php or any other directory that is convenient for you.

2) Use: Add to your layout file:


Where 'WW-DDDDDDD-DD' is your site id in GA, 'ext.widgets.googleAnalytics.EGoogleAnalyticsWidget' is a path alias to EGoogleAnalyticsWidget.php and '' is your domain (if you place a dot before domain name, subdomains will included in reports of Google Analytics)

Also you can specify additional search systems for GA as 'searchSystems' widget parameter, that must contain array, where keys is corresponding to search system domain names and values equals search system query parameter.

For example:


By default some additional russian & ukrainian search systems is added. If you don't need this, just set 'searchSystems'=>array()

11 1
2 284 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: Nayjest
Created on: Jan 24, 2011
Last updated: 12 years ago


show all

Related Extensions