Hi GetClicky.com can track visitors by username if I can send the logged in username via javascript. This is what they say to use: <script type="text/javascript"> var clicky_custom_session = { username: "bob"}; </script> How can I change bob to show what ever aMember login_name is currently logged in instead? I can get it via PHP but I don't know how to get the current username via JavaScript.
A pain with the quotes and JS but this is what I came up with and it seems to work: <?php $amember = $_SESSION['_amember_user']['login']; print "<script>var clicky_custom_session = {username: ".stripslashes("'")."$amember".stripslashes("'")."};</script>"; ?>