Piwik Custom Variable section not working


#1

Hi

I have added the code for custom variable

piwikTracker.setCustomVariable(
1, // Index, the number from 1 to 5 where this Custom Variable name is stored for the current page view
"username", // Name, the name of the variable, for example: Category, Sub-category, UserType
"santosh", // Value, for example: “Sports”, “News”, “World”, “Business”, etc.
“visit”
);

and i have generated the url as like

http://localhost/news_wire/index.php?option=com_content&username=santosh&view=category&id=1&Itemid=2

and when i click on visitors->customs variable to generate report , nothing can happen.

Please help me.

Thanks


#2

I had this same issue, went to bed, and then the next morning my custom variables were being tracked. Also, if you are using asynchronous tracking, you need to use paq push method to set your variables: _paq.push([‘setCustomVariable’,‘1’,‘VisitorType’,‘Member’]);

This is located further down on the Piwik Custom Variables page: http://piwik.org/docs/javascript-tracking/#toc-custom-variables