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

Regex help

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I'm afraid my regex skills are lacking. Can someone help me write a regex for these two URLs?

 

https://bkv.jobs/nl/vacatures/anios-ouderengeneeskunde-noord-brabant-25332/solliciteer/bedankt?success=true&application-id=5480

 

I made the part bold of the URL which is always the same. The part which isn't bold varies every time. The page is a page which people will see when they applied to a job.

 

Thank you!

Jeltje

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Jeltje V
August 2016

Re: Regex help

Explorer ✭ ✭ ✭
# 2
Explorer ✭ ✭ ✭
Hey Jeltje,

This might help you , https:\/\/bkv\.jobs\/nl\/vacatures\/(.*)\/solliciteer\/bedankt\?success=true&application-id=[0-9]{4}

This is a great source to debug your regex expressions, https://regex101.com/

hope this will work for you, please let us know about the results.

cheers
Noman

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Jeltje V
August 2016

Re: Regex help

Explorer ✭ ✭ ✭
# 2
Explorer ✭ ✭ ✭
Hey Jeltje,

This might help you , https:\/\/bkv\.jobs\/nl\/vacatures\/(.*)\/solliciteer\/bedankt\?success=true&application-id=[0-9]{4}

This is a great source to debug your regex expressions, https://regex101.com/

hope this will work for you, please let us know about the results.

cheers
Noman

Re: Regex help

Top Contributor
# 3
Top Contributor
Unless you have other parameters for your thankyou (bedankt) page just use
bedankt.*
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Regex help

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Hey Norman,

Thank you for your help, the website is really nice!

Could you help me a bit more please? We've got different website names. Is it possible to write the url as follows:

^\/vacatures\/(.*)\/solliciteer\/bedankt\?success=true&application-id=[0-9]{4}

Does ^ mean that anything before ^ will be included? I looked the meaning up, but I'm not quite sure.

Kind regards,
Jeltje

Re: Regex help

Explorer ✭ ✭ ✭
# 5
Explorer ✭ ✭ ✭
Hey Jeltje,

Google analytics only calculates destination goal on basis of page path and ignores any hostname provided so your regex should work correctly but make sure to remove ^ from the beginning as it means that url should start from the given point. So for ^\/vacatures url should start from /vacatures and nothing before should be present which in your case is not true. Just go ahead with \/vacatures\/(.*)\/solliciteer\/bedankt\?success=true&application-id=[0-9]{4}.

Hope this will help Smiley Happy

Cheers
Noman Karim