Piwik track click on email address and phone number


(Florian) #1

Hallo,

i use piwik since a few years and i love it, but now i want to track click on email address and phone number on desktop and mobile devices.

How is it possible?

Florian


(Michael Gonera) #2

Hey!

You just have to trigger JavaScript methods for these links, like this for example:

<a href="tel:888888" onClick="javascript:_paq.push(['setCustomVariable', 1, 'name', 'value', 'page']);">Item</a>

For tracking phones I think it would be best to use trackEvent, see guide with similar examples here