1

I've built a mobile web app with jQuery Mobile. In the index.php file, there're multiple pages declared as data-role="some_page_name" and their urls are like index.php#my_profile.

Now I want to use Optimizely to do A/B test on one of the pages. I created one variation and let it redirect index.php#my_profile to a new page, url: index_b.php#my_profile. But I have trouble linking this page to other not-in-test pages.

For example, if I have a link in index_b.php#my_profile like this:

<a href="index.php#favorite">My Favorite</a>

It can't link to the favorite page in index.php. And sometimes if it does, you navigate to other pages, you'll never go back to the B version/variation.

Looks like Optimizely can't adapt to the jQuery Mobile multi-page structure.

Any solutions?

Serge P
  • 1,173
  • 3
  • 25
  • 39
thmmrs
  • 31
  • 3

1 Answers1

0

You can try to add more tag in href link, such as,

<a href="index.php#favorite" rel="external">My Favorite</a>
<a href="index.php#favorite" data-ajax='false'>My Favorite</a>

You also could use full link path with http:// prefix.

<a href="http://yourdomain/yourpath/index.php#favorite">My Favorite</a>

And an other option is add a link click JavaScript method. You can control the JavaScript content.

It should be okay on optimizely or visual website optimizer.

Lu Ming
  • 632
  • 4
  • 20