Scheduled Delete Filters for GDPR Tools

We regularly delete visitors via GDPR tools from certain IP ranges.

We can not use the “Global List of Excluded IPs” because these visits will not be recorded at all.

Is there a way to set a filter / cron tab job to delete visitor log entries older than 48 hours AND from a certain IP range?

Any simple idea is welcome.

Edit: How can we delete visitor profiles via GDPR Tools that have visited a particular page/URL pattern?


Just as most parts of Matomo, the GDPR tools have an API that allows you to automate its usage:

Thank you for your reply.

I looked at the link and did not get any enlightenment with the term “(visits)” at the end of “PrivacyManager.deleteDataSubjects”.

Anyone can give me an example, if I would like to delete visitors from IP via “PrivacyManager.deleteDataSubjects” as Lukas mentioned.



The documentation definitely lets a lot to be desired, but doing what you want to do is definitly possible (after all the GDPR tool UI is doing it). You can take a look at the HTTP requests that are sent to the API there for inspiration.

I can find all Austrian visiters from this API:

This will give me a list like this:

    "idSite": 1,
    "idVisit": 4972,

And if you now want to delete this one visit 4972, you can POST to
with visits[0][idsite]=1&visits[0][idvisit]=4973 as form data.
So you can also delete multiple visits with one request just like the UI tool does.

Thank you. That’s helpful!

I created a github issue about this in case someone wants to volunteer: