2011-04-10 22:14:20 +02:00
|
|
|
[[!template id=gitbranch branch=GiuseppeBilotta/google-analytics
|
|
|
|
author="[[GiuseppeBilotta]]"]]
|
|
|
|
|
|
|
|
I've extended the google plugin to add support for Google Analytics.
|
|
|
|
This is done in two steps:
|
|
|
|
|
|
|
|
* a `google_sitesearch` config option is introduced, to allow disabling
|
|
|
|
sitesearch even when the `google` plugin is loaded
|
|
|
|
* a `google_analytics_account` config option is introduced. When it's
|
|
|
|
defined, its value is assumed to be a Google Analytics account ID
|
|
|
|
and the corresponding JavaScript code is automatically inserted in all
|
|
|
|
documents. The way this is done is shamelessy stolen from the flattr
|
|
|
|
plugin
|
|
|
|
|
2011-04-12 19:06:26 +02:00
|
|
|
> Putting this in the google plugin does not seem to be a good approach.
|
|
|
|
> That this "functionality" is offered by the same company as google search
|
|
|
|
> is really of no consequence.
|
|
|
|
>
|
|
|
|
> Also, can't this be easily accomplished by editing page.tmpl? --[[Joey]]
|