WordPress.org

Support

Support » Plugins and Hacks » Activity Log » who accessed a post?

who accessed a post?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Yakir Sitbon

    @kingyes

    Is it not massive data in your database?

    Plugin Author ArielK

    @arielk-1

    I’m not sure, maybe it’s better to put Google Analytics on your dashboard 🙂

    it is, but i would like to make some data mining on it

    so, would it be possible? if yes, what “hook” should be used?

    would it e possible to use the “template-redirect” hook?

    Plugin Author Yakir Sitbon

    @kingyes

    Hey @icm76

    You can add more monitors with your self (as other plugin or by functions.php in your theme). And you can use with our method for add in the log.

    If you want to read the method: https://github.com/KingYes/wordpress-aryo-activity-log/blob/master/classes/class-aal-api.php#L31

    And you can see how we are used with this: https://github.com/KingYes/wordpress-aryo-activity-log/blob/master/classes/class-aal-hooks.php#L147

    If you want, I can write you custom code for save “view” pages.

    Best,
    Yakir

    I’m very interested in this as well. I have a private (login required) wordpress site and I’d like to be able to see and be notified when any subscriber views a certain page.

    I have a custom page type, so I wonder if there’s a hook/action I can call within the page template to invoke a log entry.

    I know there’s probably a much more elegant way to do this with hooks within functions.php, but I’m wondering why I’m having trouble just invoking aal_insert_log itself on the page.php template I’m working on? I would expect this to snippet to add a new “login” line whose label would be the name of the page.

    if (function_exists('aal_insert_log')) {
      aal_insert_log( array(
    	  'action'      => 'logged_in',
    	  'object_type' => 'User',
    	  'object_subtype' => get_the_title(),
    	  'user_id'     => $user_ID,
    	  'object_id'   => $user_ID,
    	  'object_name' => $user_info->user_login,
      ) );
    }

    It seems the function does exist, but calling it directly doesn’t cause anything to happen. Thanks for any help.

    Plugin Author Yakir Sitbon

    @kingyes

    You need to call to this function after init action run.

    Sorry but I figured out the problem in a different thread. It *was* storing records in the database, however the data wasn’t appearing because there’s a bug on the admin side in which (for some reason) data collected belonging to users with the role of “subscriber” is omitted from reports.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘who accessed a post?’ is closed to new replies.
Skip to toolbar