Removing IDs from URLs before tracking


I would like to apply a filter/regex to all URLs to remove specific ids rather than query parameters before they are tracked. The URLs have two unique ids which will differ for each URL .
The URL is in the structure -
which needs to be tracked as

I would be grateful for any suggestions.


For this I would recommend doing so in Javascript in the Piwik Tracker, rewrite the URL and then call setCustomUrl() function to set the new cleaned up URL

Thanks for replying so quickly.I will give that a go!

Hi doubleH,

were you able to achieve it? please share how? I am facing the same issue and not able to achive it through setCustomUrl.

We are rewriting as well the URLs, just like matthieu recommended. Unfortunately we can’t use then the “Overlay”-Feature:
Original URL:
Reported URL:

Problem in Overlays: When I’m on a page with the original link he won’t display the numbers of

I would need somehow a RegEx in Overlays to tell Piwik to ignore the specific IDs of links. So that Piwik Overlay does not look for but for in the recordings.

Any help is very much appreciated. Thank you!