Running Experiments on Single Page Apps

Understand Experiments on Single Page Apps

Nowadays,  many websites and web apps use Ajax (for example: Angular.js) for rendering content without refreshing the page at the browser level. The so called one page apps use the hash tags in the URL for referencing individual pages: etc

Those URL's look different but the browser will still see them as one and the same since whatever comes after the hash tag is just the name for a standard anchor on page.

In that case, if you would like to test on this kind of URLs the following need to be done:

1) setup the experiment as usual

2) define the sitearea using the Page URL W/ query ( Page URL does not match against the hash tags)

3) whenever the URL changes (hash tag change), after the AJAX request for that specific URL returns and the content is placed on page, execute the following Javascript code:

_conv_q = _conv_q  || [];

This code usually goes into the framework's hooks that fire after the content for a specific URL has finished loading and is available on page into the DOM tree.

Good luck testing!

Have more questions? Submit a request