Removing part of a URL before tracking

Hello,

I’m trying to find out if there is a way to apply a regex to a URL to remove part of it before it is tracked. The URL I’m trying to track has a session ID within the URL rather than a query parameter
e.g. http://www.example.com/be3dbe3c09/example-page

Which needs to be tracked as http://www.example.com/example-page.

Thanks,
Andrew

You have to set a custom url before tracking, see
https://developer.piwik.org/api-reference/tracking-javascript