Rich-text Reply

Problems setting up experiment on page that uses session id

Finge 04-25-14
Accepted Solution

Problems setting up experiment on page that uses session id

[ Edited ]

I am having a problem with one of my experiments, and it seems that it's due to the fact that the page I am testing is adding a unique session id to each visit.

 

The page is located at 

http://minside.adressa.no/registrering?aviskode=ADR

 

I am only able to get a match usign the match validator if I remove the query and use http://minside.adressa.no/registrering. 

 

The problem is that if you visit that URL you get to an error page. For that reason the experiment is not tracking the visits. I have tried askin support for help on this, but I am not getting any good feedback so hoping for the community to give me some guidence :-)

 

Please help!

Skjermbilde 2014-04-25 kl. 09.51.13.png
Level 2

MJBeisch 04-25-14
 

Re: Problems setting up experiment on page that uses session id

[ Edited ]

Target your page using the "substring" targeting method. Substring matches against the string that you place in the targeting text input field, and then also accounts for anything that may be surrounding that string (thus the term substring).

 

Example:

 

You're trying to run an experiment on all the product pages on an e-commerce site, and the URL that you put into the editor when setting up the experiment was:

 

http://www.acmewidgets.com/product.apsx?pn=12345

 

Well, the "pn" query string will be different for every product (and there might be other query strings added due to other factors), so you can't exactly match against that full URL. Fortunately, all of the product pages have the same base page of:

 

product.aspx

 

Thus, you would set the targeting of this theoretical experiment to something like:

 

acmewidgets.com/product.aspx

 

and then targeting method of "substring". This means that any URLs that contain "acmewidgets.com/product.aspx" within them will be a valid targeting match.

 

For your example specifically, you could use something like:

 

minside.adressa.no/registrering

 

That should account for the randomized query string presence and value.


Additional Tip:

 

When using substring targeting, I usually remove the http://www from the string that I am targeting, so that the targeting logic will account for possible URL variations that may or may not contain that structure; ie. if a page can both be secure and unsecure (http vs https) and with/without the www.

Matt Beischel - E-Commerce Optimization Specialist CohereOne

Level 2
Kathryn 04-28-14
 

Re: Problems setting up experiment on page that uses session id

Hi there,

MJBeisch's advice is top-notch.

Another option if your experiment is running only on http://minside.adressa.no/registrering (plus any query parameters which are appended) would be to set up the targeting conditions for a simple match of the URL.

Simple match will match the URL, ignoring any query or hash parameters which follow it.

Further examples of how simple match (and all other match types) can be found at the following URL: https://help.optimizely.com/hc/en-us/articles/200040835-URL-Targeting-Choose-where-your-experiment-r...

Hope this helps!

-Kathryn
Optimizely
Finge 04-28-14
 

Re: Problems setting up experiment on page that uses session id

[ Edited ]

Thanks for the reply @MJBeisch and @Kathryn! I really appreciate your thorough feedback!

I have tried this. The problem however is that if you visit http://minside.adressa.no/registrering you will see that you get an error message (perhaps your Norwegian is a bit rusty, but it is really an error message, hehe).

For you to visit the page you have to use the following URL
http://minside.adressa.no/registrering?aviskode=ADR

When you visit the page you will get assigned a unique session id.

Still hoping for a solution. Any ideas?

Level 2
Dodiet 04-28-14
 

Re: Problems setting up experiment on page that uses session id

[ Edited ]

Finge,

 

My thought is that your experiment is not counting visitors because the Optimizely snippet is not seen on all the pages. I would guess that making the script visible when they hit http://minside.adressa.no/registrering?aviskode=ADR before the redirect happens will solve your problem with counting visitors correctly.

 

Can you try that and report back to us what you find?

Level 1
Finge 04-29-14
 

Re: Problems setting up experiment on page that uses session id

Thanks for the reply, Dodiet.

 

The thing is that there is not actual redirect. The page simply assigns a unique session id. In other words the visitor never leaves the page http://minside.adressa.no/registrering?aviskode=ADR

Level 2
Kathryn 04-29-14
 

Re: Problems setting up experiment on page that uses session id

@Finge and I have figured out the root of the problem.

The original targeting settings were aimed at http://minside.adressa.no/registrering?aviskode=ADR. When the session ID was inserted between the URL and the query parameter, this broke the match conditions.

Whilst a regular expression could be used to create a match condition, the easiest option here would be to target a substring of minside.adressa.no/registrering
Optimizely
Finge 05-05-14
 

Re: Problems setting up experiment on page that uses session id

Sorry for the late reply. I updated the settings last week and it seems to work.

 

Thank you for the solution and awesome help Kathryn! I really appreciate this!

Level 2