Piwik and Elgg

While Google Analytics may be the most popular analytics service, there are times when you want to use your own hosted solution (intranet, control over data). Piwik is a great open source package that provides an impressive set of tools and a very nice look and feel. Using it with Elgg is extremely easy. You can write a plugin to do this in a few minutes as Elgg provides an analytics view in the footer that can be extended.

This is all it takes:


  1. Install Piwik

  2. Create your Elgg plugin skeleton

  3. Create a view to hold your Piwik javascript code - in this case piwik/analytics

  4. Register a callback for the init:system event

  5. In the callback extend the footer/analytics view

  6. Install and activate the plugin

The structure of this very simple plugin looks like this:

Plugin Structure

You can download it here.

1 TrackBack

This post was mentioned on Twitter by elgg: Piwik and Elgg http://bit.ly/bxoMs6 #elgg #piwik Read More

4 Comments

Thanks Cash, contributions always valuable.

Agreed. Piwik is great, even greater for elgg. Thanks Cash, appreciate your contribution as usual.

Hi,

I'm new to Ellger?
It is a fantastic system. Thank you for your video embed moudul!

I have a question!

How can I insert the API Key???

I think in the embed.php but does not know how.

I hope you understand me, since my Englich is not as good.

Best Regards

Lars Kr├╝ger

Lars, thanks for the comment. To keep my development activity organized, could you ask this over on the Elgg site on my video embed page: http://community.elgg.org/pg/plugins/costelloc/read/384562/embed-video

I will say that an API key should not be required for that plugin.

Leave a comment

Recent Entries

  • Building a Web Services API with Elgg

    Elgg provides an API for building custom web services. You expose functionality through the web services API by building a plugin and then either publish...

  • Session security and Chrome Frame

    I've run into the nasty problem that Chrome Frame causes to session handling code that uses the user agent in its security. There are applications...

  • Piwik and Elgg

    While Google Analytics may be the most popular analytics service, there are times when you want to use your own hosted solution (intranet, control over...

  • Piwik and Reverse Proxy

    Piwik generates its URLs used in links and forms based on data in $_SERVER[]. If you are using a reverse proxy in front of your...

  • Elgg Unit Tests

    A new component in Elgg 1.7 will be a unit test framework (SimpleTest). I've written a skeleton example of how plugin authors can use the...

Close