PHPackages                             bitmannl/codeigniter-piwik - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bitmannl/codeigniter-piwik

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bitmannl/codeigniter-piwik
==========================

Install codeigniter-piwik (natec23) via Composer

1.0.0(11y ago)01.0kPHP

Since Mar 20Pushed 11y ago1 watchersCompare

[ Source](https://github.com/BitmanNL/codeigniter-piwik)[ Packagist](https://packagist.org/packages/bitmannl/codeigniter-piwik)[ RSS](/packages/bitmannl-codeigniter-piwik/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

CodeIgniter-Piwik
=================

[](#codeigniter-piwik)

CodeIgniter Library for retrieving stats from Piwik Open Source Analytics. Also a helper is included for generating a piwik tracking tag based on the piwik settings defined in the piwik config file.

Requirements
------------

[](#requirements)

1. CodeIgniter 1.7.2 - 2.0-dev
2. Piwik Install
3. For GeoIP capabilities: MaxMind GeoLiteCity

Helpful Links
-------------

[](#helpful-links)

- [Piwik Download](http://piwik.org/latest.zip)
- [Piwik API Reference](http://dev.piwik.org/trac/wiki/API/Reference)
- [MaxMind GeoLiteCity Database](http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz)

Usage
-----

[](#usage)

```
// --- CONFIGURATION ( config/piwik.php ) ------------------------------------------ //

// Base URL to the Piwik Install
$config['piwik_url'] = 'http://stats.example.com';

// HTTPS Base URL to the Piwik Install (not required)
$config['piwik_url_ssl'] = 'https://stats.example.com';

// Piwik Site ID for the website you want to retrieve stats for
$config['site_id'] = 1;

// Piwik API token, you can find this on the API page by going to the API link from the Piwik Dashboard
$config['token'] = '0b3b2sdgsd7e82385avdfgde44dsfgd5g';

// To turn geoip on, you will need to set to TRUE  and GeoLiteCity.dat will need to be in helpers/geoip
$config['geoip_on'] = FALSE;

// Controls whether piwik_tag helper function outputs tracking tag (for production, set to TRUE)
$config['tag_on'] = FALSE;

// --- LIBRARY Usage --------------------------------------------------------------- //

// Load Libary
$this->load->library('piwik');

// Get Actions
// Get last 10 days
$data['actions'] = $this->piwik->actions('day', 10);
// Get last 6 months
$data['actions'] = $this->piwik->actions('month', 6);

// Get Last 10 Visitors
$data['visitors'] = $this->piwik->last_visits();

// Get Last 10 Visitors Formatted (tries to eliminate need from parsing whats returned from the last_visits function)
$data['visitors'] = $this->piwik->last_visits_parsed();

// If GeoIP enabled, and you want to get geoip information, pass it an IP Address
$geoip = $this->piwik->get_geoip('127.0.0.1');

// --- HELPER Usage ---------------------------------------------------------------- //

// Load the helper to use to generate tracking tag
$this->load->helper('piwik');

// Call the helper function before the closing body tag in your view
...

```

To-do
-----

[](#to-do)

- Add more library functions for other API methods
- Finish documentation for all existing library functions and add user guide
- Improve the way data is returned in some of the functions
- Integrate GeoIP with Google Maps API to build a visitor map

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 91.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4076d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/df9760ff1aaa0f1fb15c3709a185da344408f5ee70afaf5507edfdb1800d5d52?d=identicon)[BitmanNL](/maintainers/BitmanNL)

---

Top Contributors

[![brycejohnston](https://avatars.githubusercontent.com/u/13186360?v=4)](https://github.com/brycejohnston "brycejohnston (21 commits)")[![BitmanNL](https://avatars.githubusercontent.com/u/11459708?v=4)](https://github.com/BitmanNL "BitmanNL (1 commits)")[![natec23](https://avatars.githubusercontent.com/u/490893?v=4)](https://github.com/natec23 "natec23 (1 commits)")

### Embed Badge

![Health badge](/badges/bitmannl-codeigniter-piwik/health.svg)

```
[![Health](https://phpackages.com/badges/bitmannl-codeigniter-piwik/health.svg)](https://phpackages.com/packages/bitmannl-codeigniter-piwik)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
