Piwik Library for CodeIgniter


This library is for integrating Piwik statistics into CodeIgniter PHP based web applications. I’m currently using (and improving) this library for my own CI projects.

The library retrieves stats through the Piwik API as well provides GeoIP capability with MaxMind’s GeoLiteCity database. A helper is also included for generating a piwik tracking tag based on the piwik settings defined in the piwik config file for easy setup across multiple CodeIgniter web apps.

The code and documentation are available on github:

Can you please tell where should I install Piwik and where should place Codeigniter Piwik library. I am using codeigniter.

I have installed Piwik in : www.cypherdemo.co.uk/test/piwik.

What would be the piwik url to specified in configuration.

Any help would be great.


If http://www.cypherdemo.co.uk/test/piwik is the URL that gets you to the Piwik web application login, that will be the URL you use.

Thank for your time and suggestion. However, When I use this url (http://www.cypherdemo.co.uk/test/piwik) it says connection refused. Error says that " file_get_contents: Connection Refused". Do you have any idea why is that? Is my hosting company blocking the connection?

Kind Regards,

Your hosting provider probably set allow_URL_open to false in the php.ini.

@wingdspur, could you check that your library also works when that setting is used?