Rich-text Reply

Regular expression help

BookedIN 06-30-14

Regular expression help

[ Edited ]

Our URLs are in the form: https://scheduler.bookedin.net/bam/customer/[customer-token]#[page-token]. For example: https://scheduler.bookedin.net/bam/customer/moo#billing or https://scheduler.bookedin.net/bam/customer/moo#settings for the settings page for the company with token 'moo'.

 

We want to set up an experiment for the billing page and are using this regex:

 

scheduler.bookedin.net/bam/customer/.*#billing$

 

This matches the page we want in the URL match validator for the most part but fails when it's in preview mode like so:

https://scheduler.bookedin.net/bam/customer/moo?optimizely_snippet=s3-381570403&optimizely_x14029106...

 

But when I remove the ? from the test URL, it matches. I double-checked with an online JavaScript regex tester that the regex itself is good and I've tried other variations (including just "billing$") but it always gets hung up on the ?. Any suggestions?

 

-- Kyle

-- giddy up!
Level 2

Josh 06-30-14
 

Re: Regular expression help

Hey Kyle,

 

Are you actually seeing a problem with the experiment not firing when you expect it to?

 

As far as I can tell that regex is correct.  My guess would be that there is just a problem with Optimizely url match validator.

Level 2
BookedIN 07-01-14
 

Re: Regular expression help

[ Edited ]

@Josh ,

Yes, I'm having trouble with the experiment not firing but after investigating, I think it's unrelated to the URL matching. We're using GWT which I think is interfering with the experiment. Was going to ask that as a separate question.

As it turns out, it's not specifically the ? that causes the validator troubles, it's the ?optimizely_ part. If I delete any character in that section, the validator says it matches so I think there might be some specific code that looks for this in the URL in the validator.

-- Kyle

-- giddy up!
Level 2
Kathryn 07-02-14
 

Re: Regular expression help

[ Edited ]

Hi Kyle,

 

Is the issue that the experiment does not fire on the page or does not fire in the preview? Can you also give more information as to why you think Google Web Toolkit is causing a conflict? 

 

There are many reasons why you might not see an experiment firing on your live site and these can range from the snippet not being installed on the page, the wrong project snippet being installed on the page, the traffic allocation being set to zero, timing issues causing the experiment to look like it is not running when actually it is and so on. From the information you're provided, it's hard to say what the underlying reason is.

 

Perhaps you could supply the experiment ID for me so that I can take a look for you?


Thanks,

Kathryn

Optimizely
BookedIN 07-04-14
 

Re: Regular expression help

Kathryn,

 

The app requires a log in so the experiment ID will only get you so far. I'm in contact with Aisha on your support team on this issue.

 

-- Kyle

-- giddy up!
Level 2