O'Reilly logo

Piwik Web Analytics Essentials by Stephan A. Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tracking visitors with the PHP tracking API

Like we just learned, the image URL you use to add tracking to pages that don't allow JavaScript is actually the endpoint of Piwik's REST API. There is a lot more you can do with the REST API than just set page titles or track images, but I decided to save the code writing part for this section. You just can't expect to do everything by inserting an image in the page. Some data can only be captured dynamically.

There are options. If you don't want to or can't use JavaScript to do your dynamic tracking, you can use PHP. It will provide you with most of the tracking functions that the JavaScript tracker provides except for:

  • Screen resolution
  • Browser plugin support
  • Local time
  • Cookie support

Piwik.org even provides ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required