• Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Coolest Guides on the Planet

coolest guides on the planet

Come for the software, stay for the community

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Installing Piwik – Real Time Web Analytics – WordPress Joomla and Drupal

October 14, 2011 11 Comments

This is a tutorial on how to set up and install Piwik – an alternative to Google Analytics – with Piwik the data you have is stored on your server and not accessible by any other party.

Piwik is an open source easy to use web analytical tool which provides stats in real time and all the other bells and whistles of analytical reporting. The three key CMS players WordPress, Drupal and Joomla have plugins/modules that get your site up and running in no time.

  • WordPress Piwik Install
  • Drupal Piwik Install
  • Joomla Piwik Install
  • iPhone Piwik App

It’s easy to use, you control and manage the master site and tag your target sites with JavaScript code similar to Google Analytics, since this site is made in WordPress and Drupal I wanted a tool the covers both CMS systems and reports on figures outside of Google to show me what is going on – this is where Piwik comes in very handy.

Creating the Piwik Site

To get the key master site for Piwik up and running, download the lastest version of Piwik here.

Extract the zip and ftp the “piwik” folder to your document root level – (if you can upload the zip and extract it from cPanel it will be a lot faster, and leave the piwik folder as below)

/public_html/piwik/

Next thing to do is create a MySQL database for Piwik, if you have a cPanel server, the quickest way is to use the database wizard.

database-wizard-cpanel

database-wizard-cpanel

Create the database name, database user, link the user to the database and grant all privileges.

database-user-all-privileges

database-user-all-privileges

Copy the names down of the db, dbuser and password as you’ll need them in the piwik installation process.

Installing Piwik

Browse to the piwik folder http://yourdomain/piwik

piwik-install

piwik-install

Follow the bouncing ball…..use the information you copied for the database settings, also a few additional fields need attention here:

– database server – it’s either going to be localhost or 127.0.0.1

– table-prefix – set to what you like

– adapter – PDO_MYSQL works for me

 

piwik-database-settings

piwik-database-settings

Follow the onscreen set up, a bit further setting up an admin user and entering your first trackable site which gives you the JavaScript code to insert to the pages.

And finally you get to the login page. – Success

piwik-login page

piwik-login page

After login you are then faced with the “Dashboard” and as soon as your web visitors arrive you can see them in the real time widget.

To add additional websites for tracking, go to “Settings”, then the tab “Websites” and “Add a new website” and fill in the required fields.

add-website-piwik-tracking-id

add-website-piwik-tracking-id

Each website you enter gets its unique id, it’s not like a Google UA No., it simply starts from 1 and increases in 1 digit increments.

To see the actual tracking code click on the right most column.

tracking-code-piwik

tracking-code-piwik

Some websites can utilise just the ID number to extract and insert the tracking code with the help of plugins or modules otherwise paste the tracking code manually into your site and watch the numbers start to come in.

SSL Piwik Set Up

If you want to have the Piwik directory all in a secure SSL/https you need to tweak the config file, open ‘config.ini.php‘:

/public_html/piwik/config/config.ini.php

add in at the end:

[General]
force_ssl_login=1

Thats it as long as your server has SSL set up it will work – forcing the directory with htaccess to SSL will not bring across page information and keywords from your targeted sites.

WordPress

To get the code easily into WordPress use the Piwik plugin here, upload to your plugins folder, activate and enter your settings, like so;

wordpress-piwik-plugin-install

wordpress-piwik-plugin-install

The key thing is to get the ID Number in and master hostname of Piwik Server and the plugin does the rest.

Drupal

For Drupal get the Piwik module here. Configure it via “Admin > Configuration > System > Piwik”

drupal-piwik-module-install

drupal-piwik-module-install


Again the importance is on the ID and the Piwik Server URL, there’s also a whole bunch of config options at the bottom.

Joomla

Get the 2.5 or 3.1 Joomla extension here, enable it and add in the tracking script code generated from Piwik for the site in question, I have had issues with the plugins sometimes and then just grab the tracking code and hardcode it in to the template by adding it in just before the closing body tag.

piwik-joomla-module

piwik-joomla-module

Thats it happy Piwiking!

 

Cats: Drupal, SEO, WordPress Tags: analytics, drupal, hosting, piwik

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • Apple details the end of Intel Mac support and a phaseout for Rosetta 2
  • Apple tiptoes with modest AI updates while rivals race ahead
  • Apple drops support for just three iPhone and iPad models from iOS and iPadOS 26
  • macOS Tahoe signals that the end is near for Intel Macs, dumping all but four models
  • With visionOS 26, Apple begins to zero-in on what the Vision Pro is actually used for

RSS mac surfer

Donate

Copyright © 2025· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2025 · gee on Genesis Framework · WordPress · Log in