Solved: error "piwikTracker is undefined" in manual tracking


#1

Just very simple question:

I allways get the error “piwikTracker is undefined” for this code:

function go_shop() {
piwikTracker.trackPageView([document.selector.variant.selectedIndex][document.selector.shop.selectedIndex][0]);
window.open(‘http://’+links[document.selector.variant.selectedIndex][document.selector.shop.selectedIndex][1], ‘_blank’);
}


solution:

manual tracking call missed the variable name “links”. it must read:

piwikTracker.trackPageView(links[document.selector.variant.selectedIndex][document.selector.shop.selectedIndex][0]);