FAQ (Frequently Asked Questions)

This pages answers some of the most common questions asked in the support forum.

How do I control what is logged?

I believe Simple History is adding to much information to the log. Can I limit what is logged?

Yes, there are some useful filters you can use to control what is being added to the log:

Can I log when a user does something on my website, like visits a page?

Yes, using the Logging API you can add anything you want to the log. That way you can log anything that a user does on your website; any page they view, any file they download, and so on. It does however require you to write som code for this to work.

Here is a basic example:

// Add a message to the log when a user visits a page on your site.
add_action( 'wp_footer', 'trackUserActivity' );
function trackUserActivity() {
  $user = wp_get_current_user();
  $user_email = $user->user_email;
  $page_title = get_the_title();
  $msg = "User $user_email viewed page $page_title";
  apply_filters( 'simple_history_log', $msg );
}Code language: PHP (php)

Can we track things that happen on the frontend of our website?

Yes, it’s possible, but you need to write some code yourself for this to work.

See these support threads that have some answers:

https://wordpress.org/support/topic/log-with-javascript/ https://wordpress.org/support/topic/track-also-download-files/ https://wordpress.org/support/topic/trigger-custom-log-through-js-event/

Can the RSS feed show more than 10 items?

Yes, you can use the filter simple_history/rss_feed_args to change how many items are included.

Can the log be shown on the front of my website?

No, there is no built in support for displaying the log on the frontend of a website.

If you are a developer you can use the SimpleHistoryLogQuery class to query the log manually and display the results.

How do I clear the log?

Items in the log are removed automatically after 60 days.

There’s also a “Clear log now”-button on the Settings -> Simple History screen.

Can I keep items longer than 60 days?

By default items in the log are kept for 60 days. This limit exists to prevent the database from growing too large. You can change this using the filter simple_history/db_purge_days_interval

How do I see more details about an event?

To see a table with more context data you can click the date and time of the event. Then a window is displayed with a more detailed view of the event. There you can see more data like IP addresses (if multiple), more details about the source of the event, if it was triggered by a user or a cron job, and more.

How can I see the IP address of an event?

Click the date and time of the event and a modal window is displayed with a more detailed view of the event. There you should be able to see the IP address.

Why is the IP address always end with a zero (0)

IP addresses are anonymized by default, by setting the last number of the IP address to 0.

Both IPv4 and IPv6 addresses will be anonymized and the IP addresses are anonymized to their network ID. So for example the IPv4 address is anonymized to and the IPv6 address 2a03:2880:2110:df07:face:b00c::1 is anonymized by default to 2610:28:3090:3001::.

This is mainly done because of the General Data Protection Regulation (GDPR) law in the EU.

You can disable the IP anonymization using the filter simple_history/privacy/anonymize_ip_address.

Who is the “other” user that sometimes is responsible for logged events?

When “Other” is used as the one that did something that means that the plugin was unable to determine who was responsible.

The plugin checks these things to determine who is responsible:

  • First it calls the function wp_get_current_user() to get the current logged in user. If a user is logged in then that user gets responsible for the action.
  • If something is done during a cron job then “WordPress” gets responsible for the action. The plugin checks if the constant DOING_CRON is set and is true.
  • If the constant WP_CLI is set and true then “WP_CLI” gets responsible for the action.

So if all above “fails”, i.e. no user, no cronjob, no WP-CLI, then the user is “Other”.

Now this does not explain who/what “Other” is in your case… :/ However, you could try to click the date/time of the logged event and a window pops up that perhaps contains some more clues of what’s going on. You can paste that info here and perhaps I can get a clue of what’s happening. (Before pasting just check that no sensitive information is included.)

Is the plugin GDPR complient?

Maybe. It depends.

No WordPress plugin in itself can provide legal compliance, and the responsibility for making your website compliant with legislation lies with the site administrators.

The WordPress Compliance Disclaimers FAQ says:

Still, at the end of the day, the responsibility remains with the site administrators to ensure their sites meet the qualifications for any compliance.

So it depends on how you use the plugin. The GDPR law is complicated and I am not a lawyer so I can’t say if its complient for you site. It’s my understanding that it depends on so many things.

GDPR is not easy to understand and I am not a lawyer so I can not really say if the plugin is GDPR compliant for you. As I understand GDPR it depends on how and where the plugin is used.

Some possibly GDPR related things to notice:

Sorry for not giving a more clear answer but GDPR really is not easy to deal with.

Even after dealing with the IP address there is till the issue that the plugin do log a lot of things that is “personal data”, i.e. information relating to an identified or identifiable natural person. Like usernames and emails. So not quite sure yet how to handle all this.

The plugin does store user login and user emails and depending on your interpretation of GDPR and your usage of what you collect and why you collect date data, it may or may not be something that you need to consider. I can’t answer more specifically I’m afraid.

Check out these related questions in the support forum:

My question in not answered in this FAQ

Please post a question at the support forum and the plugin developer or a helpful plugin user will help you!