So far Piwik is great and easy and all things nice, but I am having a spot of trouble with goal conversions for a download link using PHP image tracking. The goal is being triggered for every visit to the page, not the actual download only.
Normal page tracking is working 100% with this code:
require_once "PiwikTracker.php"; PiwikTracker::$URL = 'http://mysite.com/piwik/'; echo '<img src="'. str_replace("&","&", Piwik_getUrlTrackPageView( $idSite = 4, $customTitle = 'pagetitle')) . '" alt="" />';
Now I want to track a download link on the site, so I add:
echo '<img src="'. str_replace("&","&", Piwik_getUrlTrackGoal( $idSite = 4, $idGoal = 1)) . '" alt="" />';
Where Goal ID 1 settings looks like this:
Where am I missing the boat?
The implementation is here: