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

Tracking Flash events


You have to give it to Flash. It has stuck around for a long time. Even when JavaScript can now do most of the interactive effects on the page, Flash is still useful when it is used in the right places. One thing Flash works well with is movies, and with movies you'll want to track plays, pauses, and stops among other things as events.

We won't go deep into Flash here, just point you in the right direction if you know enough Flash to edit ActionScript. First, you need to know what version of ActionScript you are using, either ActionScript 2 or ActionScript 3.

Tracking events with ActionScript 2

We are going to make this simple. We are only going to embed an SWF movie file into a web page with a play button, and we are going to only track clicks on this play button as an event. In this same web page, you will have your standard Piwik tracking code already in place.

In ActionScript 2, we will have to use the getURL method to set the custom variables we will be using to track...