Blog

Create a Google Experiment Across Subdomains


If you ever tried to create a Google Content Experiment across multiple subdomains, you know that there is not much documentation available on the subject. During a recent site redesign for Rebates.com, I wanted to make sure that our new design did not hurt conversions. It is a funny thing that I have noticed, but many times a beautiful design does not convert well. So I set up an A/B test across subdomains (rebates.com vs beta.rebates.com) to reduce the damage.

Creating an experiment across subdomains is good when you are testing the performance of an entire site against another. If you are only testing one page then you should set up your A/B test on the same domain. Anyways, when setting up a test in Google Experiments all the variations need the same Web Property ID. So in order to create an experiment across subdomains you must follow these instructions when you set up your Google Analytics instance for each website. This will make each website have the same web property id, but you will still be able to differentiate the data.

Create a new view in Google Analytics

When you create a new subdomain, create a new view instead of a new property.

  1. In the Google Analytics Admin Panel, choose the Account and Property that you want to create the subdomain under.
  2. Click on the dropdown under View > Create New View
  3. Enter the reporting view name. I usually just enter the name of the domain, or subdomain (e.g. info.example.com).
  4. Choose the correct time zone.

Go back into the View Settings and make sure the correct domain is listed under Websites URL.

Add a new view filter in Google Analytics

  1. Go to Filters > Add New Filter
  2. Enter the domain under Filter Name
  3. Under Filter Type choose Predefined > Include Only > Traffic to hostname > that are equal to > enter the domain again for the hostname.
  4. Click save and you are done setting up the filter.
  5. Now your domain and subdomain will have the same Web Property ID. Use the same code under Property > Tracking Info in the header.php file of both websites.

    Now you can enter the subdomain as one of the variations in the Google Content Experiment!


Leave a comment

Your email address will not be published.