WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I want to count stats for logged-in users (3 posts)

  1. Gravitydk
    Member
    Posted 4 years ago #

    I want to track stats whether users are logged in, or not.
    I'm happy to hack the php code to achieve this, but am not exactly sure where to do it.

    On line 87, this look like a candidate to change:

    function stats_footer() {
    	global $wp_the_query, $current_user;
    
    	$options = stats_get_options();
    
    	if ( !empty($current_user->ID) || empty($options['blog_id']) )
    		return;

    If I remove the !empty($current_user->ID) || it might achieve the goal, but not sure if that has other consequences.

    http://wordpress.org/extend/plugins/stats/

  2. Gravitydk
    Member
    Posted 4 years ago #

    The latest version changed this code, and I can no longer work out how to ENABLE stats tracking for logged-in users. Any tips?

  3. Gravitydk
    Member
    Posted 4 years ago #

    Thank you for building this function into the newest version. I really appreciate it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags