Rich-text Reply

Conduct test during the checkout flow

vejleih 06-11-14

Conduct test during the checkout flow

How do I setup Optimizely to conduct tests during the checkout flow. I want to change the names on some buttons on the Add contact info page and Review order page - and put in some other elements. How can I do that on pages that demand that you put something in the basket and clicked checkout?

Level 2

adzeds 06-12-14
 

Re: Conduct test during the checkout flow

Hi. This is something that I think needs to be made a little clearer, or at least make the information about this easier to find.

Take a read of this and see if it helps: https://help.optimizely.com/hc/en-us/articles/200179074
David Shaw
Level 11
vejleih 06-15-14
 

Re: Conduct test during the checkout flow

However, I cannot seem to figure out how to do it on my setup which is a Drupal site build with Drupal Commerce. Here the checkout flow consists of urls like this checkout/[unique id]/step.

I do not think that that help article explains how to go about that situation?
Level 2
adzeds 06-16-14
 

Re: Conduct test during the checkout flow

This is likely to be best solved by a representative from Optimizely.
David Shaw
Level 11
Kathryn 06-17-14
 

Re: Conduct test during the checkout flow

Hi vejleih,

 

Usually the procedure to load a page in the Editor which requires session-specific content in order to load is as follows:

 

  1. Go to the live website and complete whatever actions are necessary to reach the page you are trying to load in the correct state. In your example, you'd probably need to add an item to the basket and then click on the checkout button.
  2. Leave this tab open
  3. Return to the Optimizely Editor and open your experiment
  4. Enable mixed content by clicking the small shield icon in the browser URL bar - this allows secure and non-secure content to load in the Editor and helps us to access session-specific content
  5. The page should now load in the Editor in the same state you loaded it outside of Optimizely

There are a few other things that can prevent such a page from loading correctly and these are as follows:

 

  1. If, whilst loading the page, you open the developer console (CTRL + SHIFT + J in Chrome) and see a number of red error messages which concern something called your X-Frame-Options, then you have a setting on your site which prevents the page from being loaded in an iframe. Since the Editor loads the page in an iframe, you may have difficulty accessing session-specific content due to this. 
  2. The page triggers a timeout, which causes the Editor to load the page via proxy instead of over HTTPS or HTTP. When the Editor loads a page via proxy, a temporary snippet is 'inserted' on the page and any session-specific content is lost, so you'd only see the original version of the basket page instead of the page with items added.

 

There are three possible solutions to these problems:

 

  1. If you have a development set of pages separate from your production pages and they are clones of each other, you can set up the test on the dev page, then change the targeting to match the live page when the test runs.
  2. Change the X-Frame-Options setting per each page you are testing for a short period of time to setup your test to `ALLOW-FROM optimizely.com`. Then, once the test is live, for the duration it is running and you are not editing the test, revert the X-Frame options to your `SAMEORIGIN` preference.
  3. If you have a local network, you can save a copy of the basket page with items added to your computer and then load this page locally to make the changes. You'd then change the targeting in the experiment to the live site and the experiment should work as intended.

I know this is a lot of information and some of it is relatively technical, so if you have any questions, please ask away!

 

Kind regards,

Kathryn

Optimizely
adzeds 06-17-14
 

Re: Conduct test during the checkout flow

I believe the problem is that the URL will be unique for each visitor as it will include their order-id.

This would cause Optimizley not to fire because it would never get a URL match?
David Shaw
Level 11
Kathryn 06-17-14
 

Re: Conduct test during the checkout flow

Even if the URL were unique each time, you could still follow the steps in my previous instructions i.e load the page outside the Editor first and then load the experiment again within the Editor using the URL that is currently generated. 

 

If that doesn't work, the other workarounds (such as local hosting) may be a better option.

Optimizely
vejleih 07-17-14
 

Re: Conduct test during the checkout flow

@adzeds is right. It seems that optimizely is looking for the url, so it is not firing. Wish there was a way to do this :/
Level 2
vejleih 07-17-14
 

Re: Conduct test during the checkout flow

I set up the experiment successfully, but when accessing the experiment now I just get a /checkout/3 not forund (which makes sense because the url does not exist anymore).
Level 2
adzeds 07-18-14
 

Re: Conduct test during the checkout flow

I think I might know how to get this working!

I think you need to set it up using the technique of opening the page in another tab and accessing it through Optimizely like that. Then make your changes.

You then should just have to change the URL targetting to make it a regular expression match?

A representative from Optimizely might be able to walk this through with you.

David Shaw
Level 11