Rich-text Reply

How to test with 2 language versions

hughdavis 09-02-15

How to test with 2 language versions

I need for the site to run the various versions in 2 languages --- but when the page reloads from the server, it has /en-MX  appended to the URL.  Will Optimizely work with the 2 renderings of the page by the server?

bigspencey 09-02-15
 

Re: How to test with 2 language versions

Hey Hugh,

Thanks for posting! There are several approaches we could take when running in experiments in different markets.

If you'd like to run a single experiment, then you could include some extra variation code logic that checks for /en-MX in the URL, then runs alternative copy changes. This sounds like it might be ok for your situation since there's only two languages you're looking to change.

Example:
if (window.location.href.indexOf("/en-MX") !== -1){
// Do some change in Spanish.
} else {
// Do some change in English.
}

Another way to approach this is to run two separate tests, one in English and one in Spanish. You could use URL targeting or Audience conditions to ensure they ran mutually exclusive of one another on the same page.

There could be other ways you could approach this test, but this should be a good start! I hope this helps!

Best,
Spencer
Optimizely