Book Image

Piwik Web Analytics Essentials

By : Stephan A. Miller
Book Image

Piwik Web Analytics Essentials

By: Stephan A. Miller

Overview of this book

<p>Without web analytics, you are blind on the internet. In order to improve conversions and revenue on your web- site, you need to know what is going on. Piwik gives you this data and unlike Google Analytics, gives you total control over its usage. Unlike Google analytics where the data can be read by Google, Piwik maintains complete confidentiality of your website data. By harnessing the power of your tracked data, you can raise the conversion rates on your website to new heights.<br /><br />"Piwik Web Analytics Essentials" will show you how to install Piwik Open Source Analytics and have you tracking your website’s visitors within an hour after you pick up the book! After that, you will learn how to track custom events and programmatically trigger tracking events. The book continues with ecommerce tracking and advanced Piwik API usage.<br /><br />This book will take you from installing Piwik on your web server to writing custom tracking code for your apps.<br /><br />You will learn goal and event tracking techniques and how to add them to your standard tracking to fine tune your analytics results. Nothing is untrackable using Piwik: ecommerce shopping carts, web apps, phone apps, and more can make use of Piwik tracking capabilities.<br /><br />"Piwik Web Analytics Essentials" will walk you through every step with detailed screenshots and plenty of example code.</p>
Table of Contents (18 chapters)
Piwik Web Analytics Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Downloading Piwik with SSH


You can skip the steps of downloading, unzipping, and even the next step of uploading, if you are familiar with SSH. Just use the following steps and you don't have to worry about opening your FTP client. SSH is a network protocol that allows secure command execution between two networked computers. Using SSH can be quicker and easier once you get used to typing commands in a terminal window.

You will need an SSH client to do this. If you have an Apple computer, it will come with a program called Terminal. If you are using Windows, you will have to download Putty, which is available at http://www.chiark.greenend.org.uk/~sgtatham/putty/. These tools allow you to interact with your remote web server and execute commands via your server's command line interface.

  1. 1. Log in to your web server using Putty or Terminal. If you are logging in as root, this will put you in the /root directory. If you are logged in under a user account, you will most likely be at /home/YOURUSERNAME, where YOURUSERNAME is the same username you just logged in with.

  2. 2. Navigate from your home directory to the directory that Apache will be serving the documents from. On many servers, this will be /var/www/ or /var/www/vhosts/your-domain.com. If you need to find the document root, you can run this command on the command line:

    grep -i 'DocumentRoot' httpd.conf
    
  3. 3. Once you know where your document root is, just use the cd command to get there:

    cd /var/www
    
  4. 4. Use wget or curl to grab the tar.gz from http://www.Piwik.org. wget is the more common of the two, but both will work similarly (if you are using curl, just replace wget with curl, in the following command):

    wget http://builds.piwik.org/latest.tar.gz
    
  5. 5. Now you will want to extract Piwik's files from the archive:

    tar -xvwzf latest.tar.gz
    
  6. 6. You can delete the archive file, as you will no longer be needing it:

    rm latest.tar.gz
    
  7. 7. You can stop right here if you want your Piwik installation in a folder called piwik. If you are running Piwik alongside an active site, putting your Piwik installation in a subfolder is the best choice.

  8. 8. If you want to move the location of your Piwik folder before you install, instead of browsing to the piwik subfolder of your domain or localhost, you can (from your current location at the document root):

    • Rename it or move it to another folder:

      mv piwik NEW_FOLDER
      
    • Move it to the document root:

      mv -r ./piwik/* ./