How can I track with php? (i.e., without JavaScript)

[quote=vipsoft @ Aug 16 2009, 11:55 PM]The underlying HTTP request generated by the JavaScript tracking isn’t part of the documented API. If you want to construct your own HTTP requests, you can study the uncompressed code in js/piwik.js.

A server-side tracking API is in development (i.e., I have running code) but I don’t have an ETA.[/quote]
It turns out that the piwik tags (including the non-javascript image) work perfectly, or at least as best they can with static content. The problem is the noscript image can’t be static - the data to store is only available at page load. In PHP this information comes from the $_SERVER array. I coded something to insert the proper noscript tagging so the images would work.

(Apparently I can’t link to my site where I put the code. It’s burton kent dot com / piwik-tags)

Note that javascript is still much, much better because it can track things like time on page, outgoing links, downloads, etc.

[quote=David Allouch @ Apr 16 2009, 05:01 PM]ok i already posted this on a different thread but i figured it could help you as well.

What i ended up doing is not pretty but working.
In my download script i add the following code:

(code snipped)

I cooked this from different readings. but the bottom line is that it is working.
The only problem i am trying to solve now is that it refuses to load the “Goal” plugin.
Any suggestion to make this better or even to get the goal plugin to load would be most welcome.

Cheers,

D.[/quote]

My understanding is that many features won’t work without javascript, because javascript does more than can be done with just static pages. It can track clicks on links, file downloads, etc. I’m guessing that goals are something that require javascript-specific information.

What you coded here was what I originally looked at, but I realized it might slow down page loads. So I went with the image based php tracking - you just have to pass the proper paramaters in the noscript part of the piwik tag.