Installing Piwik on Rackspace Cloud Sites is very easy and needs few steps. Piwik is an Open Source Server Installable Real Time Web Analytics Software. Piwik is less known Free Server Installable Real Time Web Analytics Software than commercial solutions. However, Piwik is most powerful among the Server Installable Real Time Web Analytics Software we tested, including paid Google Urchin which The Rackspace Cloud provided free of cost in managed configurations before Urchin died. Installing Piwik on Rackspace Cloud Sites is as easy as installing WordPress on Rackspace Cloud Sites.
Prerequisites for Installing Piwik on Rackspace Cloud Sites
Before you start Installing Piwik on Rackspace Cloud Sites, apart from a Rackspace Cloud Sites account, you will need the following tools, we have linked appropiately :
- If you are using Windows OS, you can download WinSCP for accessing SFTP.
- We are assuming that you are using WordPress for the later parts, however, this point will not matter for the actual steps needed for Installing Piwik on Rackspace Cloud Sites.
- Google Chrome or Opera Browser will be better for Windows OS, Google Chrome or Safari will be better for Mac OS X. We do not recommend Firefox anymore, its unnecessarily heavier for our purpose.
- Download the latest version of from Piwik’s official website.
- For Windows, a good text editor like gedit will be helpful, but not mandatory.
- Increase your PHP Memory Limit from htaccess to 512MB or 1024 MB. It is not mandatory but I recommend it to take the advantage.
Actual Steps for Installing Piwik on Rackspace Cloud Sites
We will install Piwik on a subdirectory for this guide for Installing Piwik on Rackspace Cloud Sites. It is possible to install Piwik on subdomain or other domain.
Creating a separate MySQL database for Installing Piwik on Rackspace Cloud Sites
Your website must run on LAMP setup. If it is WordPress 90% chance is you are using LAMP already. Login to your Rackspace account, go to Cloud Sites and click to open the website under question. Now click the features tab :
Click Add under Databases. (Note : if you scroll down this page, you will see the Cron Jobs)
Now open any Text Editor. Give the database a name, click continue and write the database name in your Text Editor. In the next page, you will have to add a Database Username and password, use anything and write down it in your text editor.? Click Finish.
The database will be created and it generally takes 2-5 minutes for proper functioning. You will see the hyperlinked database name under Databases. Simply clicking it will open the Database Information page :
Copy and paste the ˜Hostname™ , password, database name, database user name in your text editor. Steps for creating a separate MySQL database for Installing Piwik on Rackspace Cloud Sites is complete.
The core part for Installing Piwik on Rackspace Cloud Sites
Now, unzip Piwik on your desktop. Open WinSCP and go to :
Create a subdirectory, we created piwik for our website. Drag and Drop the files in WinSCP :
It will take a bit time to get transferred. After it is complete, from your browser, point to :
Like, in our case, during Installing Piwik on Rackspace Cloud Sites, it was :
System check would show all green. Then the third and most important point for Installing Piwik on Rackspace Cloud Sites will arrive, its the database details :
Please scroll above to see the Psi sign in red color like this – ?
Copy paste it in Notepad. This is the thing you will need to insert like you do for Google Analytics. Complete the steps and you will end with fun. http:// www.yourdomain.com/piwik-directory-name/ will now point to your Piwik login screen, just like ours : https://thecustomizewindows.com/piwik/
Post installation process after Installing Piwik on Rackspace Cloud Sites
I recommend to perform these as a part of Installing Piwik on Rackspace Cloud Sites, taking that you are using WordPress, for other CMS, it will need a bit modification.
- Create a robots.txt file in the root of the piwik installation subdirectory and add
Save it and CHMOD it to 0444. Otherwise Piwik change it ! You will not love to donate outgoing link juice or get indexed.
- In the same way, on your root robots.txt file, add :
Where piwik is the name of of the piwik installation subdirectory.
- Create a .htaccess file in the root of the piwik installation subdirectory and allocate the folder the php memory like we said before starting Installing Piwik on Rackspace Cloud Sites. The basic methods for optimizing WordPress for speed through .htaccess and security will work here too. Root’s .htaccess rules will also work here, so by default you can not access https://thecustomizewindows.com/piwik/config/config.ini.sample.php by virtue of WordPress. PHP Flush works here too, but do not use it.
- In my opinion, using Header and Footer Plugin or something like that is the best way to insert the tracking code in WordPress. Avoid those WP-Piwik like junks. They are basically useless and increases the burden and sucks compute cycles.
- Optimization of code : The noscript part is not needed. You can safely delete the whole noscript part. You will notice the document.write(unescape(“%3Cscript src=’ part, simply upload piwik.js to Cloud Files, copy its url and replace it. So, in my case the adjacent part is becoming :
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
So this long story is not actually only for Installing Piwik on Rackspace Cloud Sites but for optimizing it too.