Piwik plugin
This plugin can be used to integrate Piwik (http://piwik.org) open source web analytics in Grails application.
The plugin is written in Groovy/Grails without any dependencies on external libraries.
Current version
Current version is
0.1Compatible with Piwik version
0.4.1This version is developed and tested with Grails 1.1
Author
Author:
Karol BalejkoEmail: kb@groovydev.org
Docs
Tags reference
The plugin defines the following custom tags:
| Tag | Description |
|---|
| tracker | Generate Piwik tracker JavaScript code. |
tag belong to the namespace
piwikTag tracker
This tag renders Piwik tracker code.
available attributes are (all optional):
| Attribute | Description |
|---|
| url | This is piwik tracker full url (overwrites config) |
| id | This is piwik site ID (overwrites config) |
| goal | goal id. |
| revenue | goal revenue |
It is recommended to use tracker tag in layout gsp template just before the end of html body.
…
<piwik:tracker />
</body>
...
Configuration
The plugin can be configured with the standard Config.groovy file.
Actually are available the following options:
| Config key | Default | Description |
|---|
| piwik.url | none | This is piwik tracker full url (used as tag's default if url attribute is omited). |
| piwik.id | none | This is piwik site ID (used as tag's default if url attribute is omited). |
| piwik.disable | false | If is true, tracker code won't be generated. |
Sample config
environments {
development {
piwik {
url = 'http://example.com/piwik/'
id = 2
}
}
test {
piwik {
disable = true
}
}
production {
piwik {
url = 'http://example.com/piwik/'
id = 1
}
}
}Version history
0.1 (7/20/2009)