Conversion Rate Optimization Signup | Features | Pricing | Case Studies | Blog | Login

How to track conversions on subdomains or separate domains (3rd party apps)

If you want to track conversions for an A/B test (created using Visual Website Optimizer) that aren’t on the same domain, you will find this post useful.

How to track conversions on a separate subdomain

UPDATE: now subdomains are tracked by default. You don’t need to do any additional settings or add any extra code (such as the one below).

By default the cookies set by VWO is available only on the main domain (and not subdomains). For example, VWO cannot read any cookies for conversion purpose at “secure.example.com” if the test was running at “example.com”. To enable site-wide cookies, you need to specify your main domain. And to do that, simply add the following code (in bold) at the top of your VWO code:

<script type='text/javascript'> var _vis_opt_domain = 'yourdomain.com'; var _vis_opt_account_id = XXXX; var _vis_opt_protocol = (('https:' ....

Only the code in bold is what you need to add. Rest is the default VWO code. Of course, you will replace yourdomain.com with whatever your domain may be.

How to track conversions in a separate domain (or 3rd party apps)

UPDATE: now conversions on a separate domain are tracked by default. You don’t have to do any extra settings. See this blog post for more details.

No matter what settings we do, on different domains cookies cannot be read. So, we will have to use a trick for tracking conversions on pages present on a separate domain. Take following steps to implement this method:

  • Create a simple blank page on your website (named conversion.html or whatever name pleases you) , add VWO code into it and define a visit to that page as the goal of your test.
  • Now insert following HTML code on the page located at a separate domain which you want to consider as a conversion page:
    <iframe src='http://yourdomain.com/conversion.html'
    height='1' width='1'>
    </iframe>


That’s it. Now you can track conversions for your A/B tests on subdomains and even on separate domains.

  1. Easiest way to track conversions across multiple domains (using third party cookies)
  2. New VWO code snippet: cleaner, faster, easier
  3. Host Visual Website Optimizer (JavaScript files) on your server
  4. How to create an A/B split test on dynamic content?
  5. Landing Page Optimization tips: analysis of 50+ sites to find out what increases sales and conversions

2 Comments »

  1. What happens when you have an http site with an https page for sales? Won’t an http iframe on the https parent trigger a browser message of “Do you want to display secure and insecure content?”

    Comment by Dave — May 12, 2010 @ 7:59 pm

  2. [...] by the way cookies work, earlier if multiple domains were involved we instructed users to take a hackish approach to track conversions. But now, it just works out-of-the-box. No extra setting, no code fiddling. Finally, cross-domain [...]

    Pingback by Easiest way to track conversions across multiple domains (using third party cookies) « I love split testing – Visual Website Optimizer BlogAugust 5, 2010 @ 5:56 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Get email updates (it's free)

Get email updates

Or subscribe blog via RSS



Search Blog


Latest Posts



Visual Website Optimizer


Latest Tweets Follow Wingify on Twitter

Follow Wingify on Twitter