Tracking outlinks and content interactions simultaneously


one of our main uses for piwik is tracking banner ads on multiple websites.

Today some problems regarding tracking content that includes outgoing links via piwik javascript tracking came to our attention.

Consider the following (simplified) example:

<div data-track-content="" data-content-name="XXXXXXXXXX">
    <a class="gofollow" data-track="XXXXXXXXXX" href="OUTGOING_URL" rel="nofollow" target="_blank" data-content-target="">
        <img src="IMG_URL" data-content-piece="XXXXXXXXXX">

Our understanding is, that piwik should track two things when a user clicks on the ad:

  1. the content interaction
  2. the outlink

In reality piwik is only tracking the outgoing link, which leaves us with interaction-less content.

Our temporary workaround is not enabling link tracking, since tracking the content interactions is more important than tracking outlinks, although this cannot be a permament solution.

Adding to our confusion is, that there are some content pieces including outgoing links that show interactions.

Our tracking code:

var _paq = _paq || [];

var a_t = function() {
	var "XXXXX";
    _paq.push(["setTrackerUrl", "XXXXX"]);
    _paq.push(["setSiteId", "XXXXX"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];
	g.type="text/javascript"; g.defer=true; g.async=true; g.src=u+"js/"; s.parentNode.insertBefore(g,s);


Piwik requests for outgoing link (not counting interaction) and counting interaction:


Any help would be appreciated.


1 Like

Does anybody have an idea?

Maybe someone from the piwik project would be able to answer the question?

Did you ever get a resolution to this? We are seeing the same issue. Our outlink and content interaction numbers do not agree at all.