Tracking outlinks and content interactions simultaneously

Hello,

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">
    </a>
</div>

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 || [];
_paq.push(["trackPageView"]);
//_paq.push(["enableLinkTracking"]);

var a_t = function() {
	var "XXXXX";
    _paq.push(["setTrackerUrl", "XXXXX"]);
    _paq.push(["setSiteId", "XXXXX"]);
    _paq.push(['trackVisibleContentImpressions']);
    _paq.push(["removeDownloadExtensions",["jpg","png","tiff","gif"]]);
    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);
};

jQuery(document).ready(function(){
    window.setTimeout(a_t,500);
});

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

https://XXXXX/js/?link=XXXXX&c_i=click&c_n=XXXXX&c_p=XXXXX&c_t=http...
https://XXXXX/js/?c_i=click&c_n=XXXXX&c_p=XXXXX&c_t=http...

Any help would be appreciated.

Cheers
Philipp

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.