This is a clone post from http://blog.freedomsponsors.org/goodbye-google-analytics-hello-piwik/
(Because people on Hackernews “DDOS’ed” the original content :-))
A few days ago I saw this link on Hacker News:
Why to use Twitter, Facebook and Google Plus share links and not buttons
Here’s the important part:
But I am not going to discuss if you should or should not insert sharing buttons in your blog, what I am going to show you here is how to do it with out exposing your visitors to the big groups of the Internet, yes, Facebook, Twitter, Google, those who are now tracking you and sharing the info with governments.
I think is each one responsibility to protect your visitors, and try not to expose them to tracking, and keep their info as save and private as possible. Now, when you use Facebook or Twitter buttons, or the G+ button, you are loading scripts from their sites, and thus giving them the possibility to track your visitors.
“Well, that’s a quick fix” – I though – “but what do I do about Google Analytics?”
I was convinced that GA would have to go away. Even if I had to build an alternative from scratch.
Turns out there was no need for such drastic measures.
- Must be Open Source
- The backend must be easily deployable separately from the website being monitored, preferrably in a free cloud host service like Heroku or Appengine.
- Must have basic reports that display website usage and growth.
Actually, Piwik is much better than what I though I would find.
I’m actually happier with Piwik’s reports than GA’s.
And thanks to Openshift, installation was RIDICULOUSLY easy.
If you have a website, you should care about not exposing your users.
I’ll tell you how to do it. I bet you’ll be able to switch your site from GA to Piwik in, like, half an hour.
1) If you don’t have one, create an account on Openshift.
2) If you don’t have already, install rhc, the Openshift command line tool.
3) Then take a look at this repo on github: https://github.com/openshift/piwik-openshift-quickstart/
This is pre-configured Piwik just for Openshift.
4) Follow the instructions on the repo readme. Make sure to take note of mysql “Root user” and “Root password”.
If all goes well, you’ll have a Piwik instance up at http://piwik-$yournamespace.rhcloud.com.
There’s more to do. Too bad the repo readme stops here.
5) Point your browser to your new Piwik instance – http://piwik-$yournamespace.rhcloud.com
You’ll see a configuration wizard, go along with it.
6) One of the steps is configuring the database. This is a little tricky.
You’ll need the mysql “Root user” and “Root password” that you took note before, that’s easy.
But you’ll also need the database IP address, which is not so obvious.
7) To get the database IP address, you’ll need to ssh into your piwik instance.
Go to https://www.openshift.com/
Click “My apps”, and then “Piwik”
Click “WANT TO LOG IN TO YOUR APPLICATION?”
A ssh command will appear (something like “ssh email@example.com”)
Copy and paste that into a terminal: you’re ssh’ed to your piwik instance
Type “env” to see a list of environment variables
Look for a variable called “OPENSHIFT_MYSQL_DB_HOST” – that’s your mysql IP address
9) Finish the wizard and you’ll see Piwik’s Dashboard. Open your site and see the stats get updated on realtime.
Note 1 – After I did the procedure above, there was a version update warning.
Clicking on it suggested me to update to version 1.12. Piwik self-updated automatically without problems. I just had to click “next”
Note 2 – The main dashboard is a collection of widgets. One of those widgets kept giving an error and breaking the layout of the whole site. Removing that widget from the dashboard (by clicking the X button) solved the problem.
– Piwik looks like a great product with user experience that surpasses expectations.
– Openshift makes things even better.
– You should replace your Google Analytics script with it.
(we’d rather see their campaigns on FreedomSponsors, but we’ll forgive them this time 🙂 )