VWO Logo
Like this post?
Read our in-depth guide to Conversion Rate Optimization
Share this post
2 Min Read

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

placeholder
Paras Chopra
Founder and Chairman of Wingify.

If you want to track conversions for an A/B test (created using VWO) 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 Smartcode:

<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 Smartcode. 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 Smartcode 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='//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.

More from VWO

CMOs are Becoming CROs: How to Integrate Marketing and Sales to Actually Drive Revenue

Note: This is a guest article written by David Zheng, the Founder of GrowthWit and WiseMerchant and the Head of…

Read More
David Zheng

David Zheng

12 Min Read

VWO Was Colart’s First Choice As An Optimization Platform

We spoke with Patxi Gadanon, who works as a Senior Web Manager for one of…

Read More
Smriti Chopra

Smriti Chopra

8 Min Read

Data-Driven Optimization: How The Moneyball Method Can Deliver Increased Revenues

Whether your current ROI is something to brag about or something to worry about, the…

Read More
Jon MacDonald

Jon MacDonald

5 Min Read
>
Shanaz Khan from VWO

Hi, I am Shanaz from the VWO Research Desk.

Join our community of 10,000+ Marketing, Product & UX Folks today & never miss the latest from the world of experience optimization.

A value for this field is required.

Thank you!

Check your inbox for the confirmation mail