doubleH
January 10, 2014, 11:19am
#1
Hi,
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 - http://www.example.com/example/cf5dbe8a/example-directory/123-456789/example-page
which needs to be tracked as http://www.example.com/example/example-directory/example-page
I would be grateful for any suggestions.
Thanks!
doubleH
matthieu
(Matthieu Aubry)
January 12, 2014, 10:03pm
#2
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
doubleH
January 13, 2014, 8:02am
#3
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.
finner
March 6, 2017, 3:23pm
#5
We are rewriting as well the URLs, just like matthieu recommended. Unfortunately we can’t use then the “Overlay”-Feature:
Original URL: http://www.example.com/cf5dbe8a/example-page
Reported URL: http://www.example.com/ID/example-page
Problem in Overlays: When I’m on a page with the original link http://www.example.com/cf5dbe8a/example-page he won’t display the numbers of http://www.example.com/ID/example-page
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 http://www.example.com/cf5dbe8a/example-page but for http://www.example.com/ID/example-page in the recordings.
Any help is very much appreciated. Thank you!