Support » Plugin: Simple History » Monitoring frontend

  • Resolved premagraphic


    Hello, thanks for your work.
    Can Simple History monitoring the activity in frontend for logged users?
    for example, monitoring the pages viewed or the clicks in links?
    Do you have any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, It would be really good to have a shortcode that you could add to a page and then see it being tracked as an event in the reports.

    I have a recipe website and I really would like to see what users looked at what recipes.

    Hi @premagraphic
    I found the answer deeper into the Support forum a bit.
    Just add this to your function.php file:

    // Log page views by non-admin users
    add_action('wp_footer', function() {
        // Do not log admins
        if (current_user_can('edit_users')) {
        // Log only page views
        if (is_page()) {
            apply_filters('simple_history_log_info', 'A user viewed the page "{page_title}"', [
                'page_title' => get_the_title()
    • This reply was modified 3 months, 3 weeks ago by eoinlennon.
    Plugin Author Pär Thernström


    Thanks @eoinlennon for finding and posting the snippet!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.