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
5.5K members online now
5.5K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Replace filter isn't working properly

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hello, everybody! Smiley Happy Happy to talk to you again!

 

I'm testing my new filter for replacing get-param ?thankyou now. I already have one working successfuly. When string (\?|&)thankyou is replaced by -thankyou.

 

But I would like to apply a bit different rules for pages, containing .html in the end of their string. After applying the first filter site.ru/blah.html?thankyou looks like site.ru/blah.html-thankyou, that doesn't look really nice.

 

So I created new rule and put it above all the other filters:

Search string

\.html\?thankyou.*

Replace string

-thankyou\.html$

 

But it doesn't work. Urls are still being replaced according to previous url, though new filter is above the list. 

Please, help me to figure out that problem.

 

Thank you in advance!

3 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Anna A
October 2016

Replace filter isn't working properly

Follower ✭ ☆ ☆
# 6
Follower ✭ ☆ ☆

Thanks everyone for assistanceSmiley Happy The problem was in using RegEx for "Replace" field. Now everything is correct.

 

 

View solution in original post

Re: Replace filter isn't working properly

Top Contributor
# 2
Top Contributor
Hi Anna,

Why is .html structured before 'thank-you' ?

Regarding your question, you cannot change data retroactively after you have applied a filter. Only future incoming data.
Joshua, Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’

Re: Replace filter isn't working properly

Top Contributor
# 3
Top Contributor
Hi,

Please also note that it can take up to 24 hours before you can see filter effects in the reports. You just need to wait before your changes take effect.

https://support.google.com/analytics/answer/6046990?hl=en

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Replace filter isn't working properly

Follower ✭ ☆ ☆
# 4
Follower ✭ ☆ ☆
It's not about time unfortunately. The filter isn't working for some reason.

Re: Replace filter isn't working properly

Rising Star
# 5
Rising Star
Anna,

I like filters but am a big believer in shaping the hit before it gets to GA. If you have GTM, it's super easy to implement today.

You can also do it in the GATC: https://developers.google.com/analytics/devguides/collection/analyticsjs/pages#modifying_page_urls

Would that work for you?

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn
Marked as Best Answer.
Solution
Accepted by topic author Anna A
October 2016

Replace filter isn't working properly

Follower ✭ ☆ ☆
# 6
Follower ✭ ☆ ☆

Thanks everyone for assistanceSmiley Happy The problem was in using RegEx for "Replace" field. Now everything is correct.

 

 

Replace filter isn't working properly

Follower ✭ ☆ ☆
# 7
Follower ✭ ☆ ☆

Well, that''s not an option for my case, as we need to replace url only for 1 view, not the whole property.

 

Still thank you very much for your idea Smiley Happy