Custom Variable not appearing in Front End(:P)

Hello Piwik,

We have the following tracking code,

We also reference the javascript files from http://spservices.codeplex.com in the head section of our masterpage…

However the custom variable doesnt appear - anything we are missing?

Cheers.

Marc.

if you add


var userName = [...]
console.log(userName); // or alert(userName);

does it display the username / popup ?

Hi Matt,

Code now looks like this a) is this correct, if so, it doesnt appear still.

Many Thanks for your assistance.

change the code lines with:


piwikTracker.setCustomVariable(1, "Login_name", userName, "visit");
alert(userName);
piwikTracker.trackPageView();

then it should display the user name in the popup. if popUP shows empty, it means your username is not set correctly