Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Add tracking of guest visitor and view page log
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jul 30, 2012
1 parent f092ba9 commit cbae1a0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion zanata-war/src/main/webapp/WEB-INF/layout/template.xhtml
Expand Up @@ -122,7 +122,14 @@
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", #{applicationConfiguration.piwikIdSite});
piwikTracker.setCustomVariable (1, "username", "#{identity.username}", "visit" ) ;
var username = "#{identity.username}";
if(#{identity.loggedIn} == false)
{
username = "anonymous";
}
piwikTracker.setCustomVariable (1, "Visit", username, "visit" );
piwikTracker.setCustomVariable (2, "View page", username, "page" );

piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
Expand Down

0 comments on commit cbae1a0

Please sign in to comment.