Hi. I am a new user and found something which might be a problem in Piwik. On my website I load some content after the page itself was loaded. That content contains HTML and links to several different outgoing (i.e. other domains) links. However, none of them were tracked. Tracking outgoing links which were not loaded with AJAX work fine.
Is this problem known alread? Any solution?
If there is no such feature right now, I would happily suggest it.
The page makes an AJAX request using jQuery and replaces the content of a div element with the result of the request using $(“div#priceComparison” ).html(result). The result variable contains actual HTML (I know, not very clean). All the links in “result” won’t trigger any statistics in Piwik whereas normal links (e.g. at the start page) can be observed with Piwik.
You can always attach a click even on your updated content:
$.get('/whatever',function(data){
// render your html content here
$('a.my-fresh-links').click(function(){
_paq.push(["trackLink",$(this).attr('href'),'link']);
});
});
Bear in mind the URL argument should be FULL URL, not relative.