Tracking a button click


#1

(don’t beat-up on me too bad ;))

We have a landing page with 2 buttons and all I need to track is how many unique visits to the page and (then) which button they clicked.

What am I missing - would think this is simple “stuff”; can’t figure it out.


(Fabián Rodríguez) #2

In Piwik (and web analytics) terminilogy a click of a button is an Event.

Here is the related documentation showing how to track events:
https://piwik.org/docs/event-tracking/

You can look at http://acmeinc.magicfab.ca/shop/ (an example site I put together), check the source code to see example javascript code attached to buttons, it’s one way of doing this. Perhaps others can also pitch in and provide other examples.


#3

Thanks Fabián - I can follow the click example - here is what I’m using (Search for homes ) but am missing how PIWIK recognizes the event.

Is there setup needed on the PIWIK side?