Rewrite querys that might include pii with regex?

I wonder if any of you know how to write a script that would rewrite queries that might include PII, such as email, personal security number. I would like to create a regex that would redact personal info, in order for us to start using the internal site search report again.

It is similar to this: #GTMTips: Remove PII From Google Analytics Hits | Simo Ahava’s blog

Any ideas how to do that? I really miss the site search report!

Please more infos.

  • matomo version
  • tracking method

Or track site search manually and use a regex inside a replace() for the values, and disable the search tracking in the backend to hold 'trackPageView' enabled.

1 Like