Sign in to edit and +1 items.
Login required
Download

Piwik plugin

(0)
Author(s) Karol Balejko
Current Release 0.1   (2 years ago)
Grails Version 1.1
Tags web analytics 
Dependency
compile ":piwik:0.1"
Last updated by karolb 2 years ago
grails install-plugin http://groovydev.org/grails/plugins/piwik/grails-piwik-0.1.zip
Last updated by karolb 2 years ago

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.1

Compatible with Piwik version 0.4.1

This version is developed and tested with Grails 1.1

Author

Author: Karol Balejko

Email: kb@groovydev.org

Docs

Tags reference

The plugin defines the following custom tags:

TagDescription
trackerGenerate Piwik tracker JavaScript code.

tag belong to the namespace piwik

Tag tracker

This tag renders Piwik tracker code.

<piwik:tracker />

available attributes are (all optional):

AttributeDescription
urlThis is piwik tracker full url (overwrites config)
idThis is piwik site ID (overwrites config)
goalgoal id.
revenuegoal 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 keyDefaultDescription
piwik.urlnoneThis is piwik tracker full url (used as tag's default if url attribute is omited).
piwik.idnoneThis is piwik site ID (used as tag's default if url attribute is omited).
piwik.disablefalseIf 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)

  • First public release
Last updated by admin 2 years ago
Last updated by admin 2 years ago