Quick Workaround for A/B Testing Across Domains

Let’s say I have a goal of an e-commerce sale, but, the final step of the sale happens on another website.  I have all my products on my online store, and I host my own shopping cart.  Once it’s time to take the credit card, however, I’ve chosen to let someone else handle it, and the visitor is sent on over to a third party payment gateway.

For anyone that wants to run some experiments using the A/B test in Google’s Website Optimizer, and has the test and conversion pages on different top level domains, you might be a bit frustrated that at this point it’s not an easy task.

While you always have the option of using the Multivariate test to emulate an A/B test across domains with some minor code tweaks, sometimes we just want the ease of Website Optimizer’s A/B option.  Here’s a quick little workaround that may work for you – you just have to be willing to make the sacrifice of abstracting your conversion just a bit.

Even if I could put the goal conversion code on the third party’s thank you page, I won’t see any conversions show up in my Website Optimizer A/B test, because I’ve crossed domains and the cookie that’s used to track me didn’t follow me.  So what to do?

I can abstract my conversion a step or two back to the pages that are on my domain, but I have to make (and be comfortable with) the assumption that if one of my landing page versions was more likely to get someone into the checkout process, it would also be more likely to get someone to actually go through the checkout process and make a purchase.

So rather than put the goal conversion code on the actual thank you page over on the third party domain, I’m going to call the goal conversion code just before I send the user from my domain over to the third party.

If my shopping cart looks like this:

Then the last thing that happens on my domain is a click on that checkout button.  So I just tell Website Optimizer that if that button gets clicked, go ahead and count a conversion.

In order to count a conversion when that button gets clicked, I need to:

1) Add one JavaScript function in my checkout page’s code that looks like this:

_uacct = 'UA-XXXXXXX-Y'; urchinTracker("/ZZZZZZZZZZ/goal"); return true; }

Note that you’ll need to change the X’s, Y’s, and Z’s above to the actual numbers used in your experiment.

2) Call that function in an onClick event.  To do this, just change that button’s code slightly:

Alternatively, you could do this using the onSubmit event of your form:

Done.  As long as you’re comfortable with the assumptions you’ve made, you’re now getting conversion data for an A/B test setup within Website Optimizer.

There’s another advantage to this approach, in that you’ll likely get more conversions than you would have if you were counting only completed e-commerce transactions.  More data and an inherently higher conversion rate mean your test can take less time to run.  This approach is often nice to use in scenarios where you have very few conversions whether the thank you page is on your domain or not.  So again, as long as you’re comfortable with the assumptions you’re making, you can abstract many tests back a level in order to get more data faster.

Julie Ferrara-Brown

Share
Published by
Julie Ferrara-Brown

Recent Posts

Google Delays Third-Party Cookie Deprecation to 2025

Google announced on April 23 that it will again delay third-party cookie deprecation (3PCD) in…

1 week ago

Understanding Funnel Reports in GA4

Funnel reports have long been one of the most actionable reports in a marketing analyst’s…

1 week ago

GA4 Monetization Reports: An Overview

GA4’s Monetization reports provide organizations with simple but actionable views into the revenue-generating aspects of…

2 weeks ago

This website uses cookies.