Custom Clicks

(zombiitv) #1

I spent the whole day getting a good understanding of Piwik works. I have messed around with Goals and with trackLinks but neither one of them do quite what I want.

What I really want is to send custom data to Piwik with a js call on a user click. Then take this custom data and populate a custom table. I have some ajax features on my site that I need to track and I would like to integrate it into Piwik, I think this can be done but I’m having a hard time working with the core functions and procedures. I’m hoping to get some help on the forum before I start to write some custom code in the core files (which I really don’t want to do).

So can I send custom data with a js function and catch it in php? Once I have that path taken care of, I can store it and create some APIs to get it but I need some help getting from a to b.

I think I should be using addListener but I need some help in the format of the JS and the php to catch the data. What hook do I use with addListener?


(vipsoft) #2

Maria outlined her approach here:

We’ll provide an example (eventually).