Nelio A/B Testing is a plugin specifically designed for WordPress. Its aim is to make A/B Testing in WordPress extremely easy. However, this entails some limitations: as soon as one of your visitors leaves WordPress and accesses an external page, our plugin can no longer track her activity. Even though usually this is not a problem, for the tested page and the conversion action both occur in your WordPress, there are some scenarios in which the conversion occurs outside. One typical example is an e-commerce system, where the checkout process is performed outside WordPress. Let's see a few solutions to this problem.



Using «External Page» Conversion Actions


The easiest way to track conversions to external pages is when those pages are directly accessible. Thus, for instance, you may be testing the page http://wordpress.example.com/foo and you want to know when a user accesses a page http://external.com/goal. If this page is directly accessed from your WordPress installation (that is, there's a link in your http://wordpress.example.com/foo page that takes the user to http://external.com/goal), then you can use «External Page» conversion actions.


External Page conversion actions count a conversion whenever a visitor clicks on a link that will take the user to an external page. Therefore, they count the fact that a user "is about to leave WordPress and access the (relevant) conversion page". Even though they're not as accurate as actually accessing the external page, they results are quite close and implementing this solution is super easy!


However, if the http://external.com/goal page cannot be directly accessed from /foo (for instance, your user has to go from /foo to http://external.com/bar, and from http://external.com/bar to http://external.com/goal), then you'll need to implement one of the following approaches.



Redirect your visitor back to WordPress


The easiest solution to overcome the fact that a user "left" your WordPress site and, therefore, you cannot track whether she fulfilled your conversion action or not is to redirect your user back to WordPress once she's converted. For instance, consider the following scenario:

  1. A visitor decides to buy a product or service you're offering in your WordPress site.
  2. She then clicks on Buy and she goes to an external page called http://external.com/checkout, where she'll have to fill a form with some payment details.
  3. Once she's completed the form, she checks-out and the purchase is completed. The user is now in http://external.com/purchase-completed.


In order to know that the purchase has been successful, we could add a redirection in the http://external.com/purchase-completed page that redirects the user back to WordPress. In JavaScript:


<script type="text/javascript">

window.location = 'http://wordpress.example.com/thank-you';

</script>


As you can see, we've now redirected the user to a Thank You page we have in our WordPress. Using this page as our «Page» conversion action (accepting conversion «from any page»), we're now able to track a conversion that occurred outside. Note this Thank You page can be an already existing page or a page you specifically created for tracking that conversion. Also note that the page should not be accessible from anywhere else, or you'd be counting conversions that could have never occurred.



Simulate your visitor is still in WordPress


If you don't want to redirect your users once the purchase is completed, you can simulate they're still in your WordPress site. In order to do that, you simply need to add a hidden iframe in the page where the conversion occurred (in the previous example, http://external.com/purchase-completed) and make it point to your actual conversion page:


<iframe

  src="http://wordpress.example.com/fake-goal"

  style="display:none;"></iframe>


Using this approach, your visitor will "be" in your WordPress site whilst she is in http://external.com/purchase-completed.


Note. Remember to add the Fake Goal page as the «Page» conversion action of your experiment and make sure it is not accessible from anywhere else (it's not linked anywhere nor included in any menu), or you'd be counting conversions that could have never occurred. Also, we recommend you exclude that page from being indexed by search engines (it's a fake page that should not be ever "counted").