Ready to get started?Download WordPress


Google Analytics for WordPress
Tracking Logged In User Name with Custom Variable (1 post)

  1. Ryan Miller
    Posted 1 year ago #

    Hi Joost,

    Great plugin!

    I'm trying to setup a simple idea: track downloads by username through a custom variable. This was fairly simple through manually adding the code to my theme file, but I was wondering if there was a simple way of doing this through the Filter API? I can't seem to figure it out.

    Here's the code that used to get it working:

    _gaq.push(['_setCustomVar',2,'user-name','<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login ; ?>',1],['_trackPageview']);

    Thanks for anyone in the community who might be able to help!


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic