문제

I have piwik to track my website visits. My website has a login page and I would like to do the analysis per userid, not necessarily per IP. Is there a way where piwik can store my user session variable in order me to know exactly which users used a determined page? Thanks in advance.

도움이 되었습니까?

해결책

The way to do this is via custom variable.

Basic Code:

piwikTracker.setCustomVariable(1, "Member", "<?php echo $username;?>", "visit"); piwikTracker.trackPageView();

visit scope will last for the session

Piwik Docs at: http://piwik.org/docs/custom-variables/

다른 팁

Instead of using a custom variable, you could use Piwik's built-in User ID feature, which also has the added benefit of allowing Piwik to more accurately track uniques.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top