Piwik plugin

  • Tags : web analytics
  • Latest : 0.1
  • Last Updated: 31 December 2009
  • Grails version : 1.1
  • Authors : Karol Balejko
0 vote
Dependency :
compile ":piwik:0.1"

Documentation

Summary

Installation

grails install-plugin http://groovydev.org/grails/plugins/piwik/grails-piwik-0.1.zip

Description

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