I am using PIWIK to track events along side the site. I have some ajax actions that I am attempting to track by using the following method inside the js function:
Uncaught ReferenceError: setCustomUrl is not defined
function doCrime_js(crimeid) {
$("#crime_results").html(“It takes you a minute to do the crime…”);
$.get(“docrime.php?c=”+ crimeid, function(data) {
$("#crime_results").html(data);
setCustomUrl(‘http://domain.com/Event/Crime/’ + crimeid);
_paq.push([‘trackPageView’, ‘Event/Crime/’ + crimeid]);
refreshUserData();
});
function doCrime_js(crimeid) {
$("#crime_results").html(“It takes you a minute to do the crime…”);
$.get(“docrime.php?c=”+ crimeid, function(data) {
$("#crime_results").html(data);
_paq.push([‘setCustomUrl’, ‘http://domain.com/Event/Crime/’ + crimeid]);
_paq.push([‘trackPageView’, ‘Event/Crime/’ + crimeid]);
refreshUserData();
});
}