Triggering Tracking from PHP Code

I’ve just started to use Piwik (read: n00b). My sites, which are for affiliation, all use 1 page to reroute web users to the respective website product page.

I was wondering if it is possible to trigger tracking (and a goal) from within PHP code only? That way I can tell when someone clicked on the ‘add to cart’ button yet not interfere with the re-routing.

Any advice would be appreciated.

Possible, yes. I protoyped this with a URL shortener a while back. We have to make some refinements to the API before unleashing it though.

I’m looking forward to it. For now I just added an onsubmit action to my form but I would prefer to keep that last click action hidden as well as ensure it runs if the client has disabled javascript.

Thanks again for all the hard work!