AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.9K members online now
4.9K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Search and Replace Query String /?/

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I'm receiving a list of urls in google analytics with a /?/ at the end and need to replace it to the canonical url in Google Analytics.

 

Example:

Wrong: https://www.viajablog.com/como-llegar-capri.com/?/

Correct: https://www.viajablog.com/como-llegar-capri.com/

 

I tried with a filter and search and replace "request URI":

search string: /?/

replace string: /

but this is actually sending all pages to the home page: https://www.viajablog.com/ 

 

Is there a right search and replace I could use?

 

Thanks and regards

Enric

 

1 Expert replyverified_user

Search and Replace Query String /?/

Top Contributor
# 2
Top Contributor

Hi :-)

try the following instead

search string:\?/$

replace string: 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Search and Replace Query String /?/

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks Bronwyn, for some reason it doesn't happen anymore. Maybe a cache system issue creating odd url's. I'm bookmark your answer in case it happens again. Thanks! Smiley Happy