How to re-initialize link tracker?

Hi all,

I use piwik on an ajaxified site where links are dynamically added to the site. How can tell piwik to reinitialize the link tracker by adding its onclick handler to all new links?



You can’t, and you wouldn’t want to because it would be a potential performance hit if there are a lot of anchors. If you’re dynamically adding links, you can add the click handler to the newly added DOM element, i.e., piwiktracker.addListener(element).

Perfect, I’ll try that, thank you!