WordPress.org

Ready to get started?Download WordPress

Forums

ARYO Activity Log
who accessed a post? (10 posts)

  1. icm76
    Member
    Posted 5 months ago #

    hi,
    is it possible to monitor what users accessed certain posts? (also audit "view"/read not only create/update/delete operations)?

    Thanks,
    Catalin

    https://wordpress.org/plugins/aryo-activity-log/

  2. Yakir Sitbon
    Member
    Plugin Author

    Posted 5 months ago #

    Is it not massive data in your database?

  3. ArielK
    Member
    Plugin Author

    Posted 5 months ago #

    I'm not sure, maybe it's better to put Google Analytics on your dashboard :)

  4. icm76
    Member
    Posted 5 months ago #

    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?

  5. icm76
    Member
    Posted 5 months ago #

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

  6. Yakir Sitbon
    Member
    Plugin Author

    Posted 5 months ago #

    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

  7. cantonbecker
    Member
    Posted 2 months ago #

    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.

  8. cantonbecker
    Member
    Posted 2 months ago #

    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.

  9. Yakir Sitbon
    Member
    Plugin Author

    Posted 2 months ago #

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

  10. cantonbecker
    Member
    Posted 2 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.