Hi,
I have some problems with custom variables (with “page”- scope) and the goal conversions. It doesn’t work for me
There aren’t any conversions for the custom variables. There are conversions for e.g. the country.
To reproduce the bug, I used a fresh installation with the latest code. I defined a goal, which must be triggered manually and which can be converted multiple times per visit.
I trigger that goal with javascript, some time after the page loaded (eg. the user made some interactions like pressing a play button or something else).
My HTML for testing (which simulates my needs):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test</title>
</head>
<body>
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://192.168.57.171/" : "http://192.168.57.171/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var logit = function() {
try {
var piwikGoalTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikGoalTracker.trackGoal(1);
}
catch( err ) {}
};
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.setCustomVariable(
1,
"Test",
"testit",
"page"
);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
window.setTimeout("logit()", 5000)
} catch( err ) {}
</script>
<noscript><p><img src="http://192.168.57.171/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>
Thanks,
panicskillingme
PS: The custom variable columns in the database table “log_conversion” are all empty.