Tracking a Click on a Link to an external website


(Mwesley) #1

I have Piwik installed across a number of domains, and the issue I keep running into is that the tool seems to be tracking every page view as a Goal vs. the actual Goal which is configured to trigger when a visitor clicks on a Link to an external website. The “Contain” is yieldtracker.com/adclick . So what I am seeing in reports is a 1:1 with page views and Goals.

My Goal ID is (1)
And the Site ID is 3

Any help is VERY welcome.

Thanks,

Martin

The code is below:


(vipsoft) #2

If you want the server-side trigger, remove the manual trigger on the client.

piwikTracker.trackGoal(1);

(Mwesley) #3

Well I removed that, and it worked for just that one domain (madeintheusa.mp, but none of the other domains worked. All of their ID Goals were the same, then we tested creating a unique ID goal and still no dice.

As an example, we tested both versions below and neither worked for the site: SouthCarolinaOnlineColleges.mp whereby it had the same goal as ther site as well as where we created a new unique goal ID:

(at this point I am willing to pay someone some money to help us get this fixed;-)For some reason when I paste the code in this thread it it turning the http:// to ####### so note that on the site it is not #######. You can see it here ######southcarolinaonlinecolleges.mp

Version 1:

<!-- Piwik -->
<script type="text/javascript"> 
var pkBaseURL = (("https:" == document.location.protocol) ? "https://SouthCarolinaOnlineColleges.mp/piwik/" : "######SouthCarolinaOnlineColleges.mp/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript"> 
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php",3978);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tag -->

Version 2:

<!-- Piwik -->
<script type="text/javascript"> 
var pkBaseURL = (("https:" == document.location.protocol) ? "https://madeintheusa.mp/piwik/" : "######madeintheusa.mp/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript"> 
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php",3978);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tag -->


(vipsoft) #4

I see you’re using the same site id for both sites? Do they share the same Piwik database?


(Mwesley) #5

Eash site has its own ID now… we have 4,998 sites. we were testing if the PiWik URL was the main URL the UI is on or if it was site specific… We have been toying with it, and we may have it working… Will know in an hour or so.

M