Rich-text Reply

Is it possible to set up targeting conditions within variations?

teachco 10-16-15
Accepted Solution

Is it possible to set up targeting conditions within variations?

We are having a bunch of campaigns that we are sending traffic to a specific url with GA utm parameters included in the urls.  We want to set up a test that targets all traffic driving to that page that has the parameter utm_source=TV, for example.  But then within that group, we have multiple utm_campaign variables (such as utm_campaign=12345, utm_campaign=23456, etc.).  The test is doing a 50/50 split between the original page and redirecting to a new url.  We want each utm_source and utm_campaign combination doing a 50/50 split but each utm_campaign has a unique variation of the redirect url.  For example, utm_campaign=12345 might be redirected to a new url with the parameter utm_campaign=54321 in the new url while traffic from utm_campaign=23456 might be redirected to a new url with utm_campaign=65432 in the url.  Is it possible to set up this kind of a test in Optimizely?  Or would I need to set up an individual test for each utm_source and utm_campaign combination since all the redirect urls are unique? 

 

Thanks!

Level 2

JDahlinANF 10-16-15
 

Re: Is it possible to set up targeting conditions within variations?

If a user comes through one campaign, and is assigned to the B group for that campaign, should they also be in the B group if they come in through a different campaign later?

 

Also, will you be doing your reporting in an external analytics system or will you rely on Optimizely?

 

There is a way to do this all as one experiment, but it would require your answers to the above questions to be "Yes" and "Yes".

teachco 10-16-15
 

Re: Is it possible to set up targeting conditions within variations?

Yes, ideally a user's experience would be the same through all their visits.  So if they originally come in through campaign 1 and get assigned to experience B then if they later come back from campaign 2, they would still get put in experience B.  As for reporting, it would be nice if we could have a quick read from Optimizely but the ultimate results of this test will be gauged from our external database so if it wouldn't be possible to track any goals in Optimizely for this, that wouldn't be the end of the world.

 

Thanks!

Level 2
JDahlinANF 10-16-15
 

Re: Is it possible to set up targeting conditions within variations?

You can set up the A/B test where the B variation runs the following code.  You will want to modify the utm_campaign values and also modify it to change the actual page the user sees:

 

 

/* _optimizely_redirect=http://custom */
/* _optimizely_evaluate=force */
	var newURL = currentURL = window.location.toString();
	newURL = currentURL.replace('/page/path/original','/some/new/page/path');

	newURL = currentURL.replace('utm_campaign=111111','utm_campaign=222222');
	newURL = currentURL.replace('utm_campaign=333333','utm_campaign=444444');
	newURL = currentURL.replace('utm_campaign=555555','utm_campaign=666666');
	newURL = currentURL.replace('utm_campaign=777777','utm_campaign=888888');
	newURL = currentURL.replace('utm_campaign=999999','utm_campaign=aaaaaa');

	var _optly={redir:document.createElement("a")};
	_optly.redir.href=currentURL;

	if (_optly.redir.href !== '') {
		window.location.replace(_optly.redir.href);
	}
/* _optimizely_evaluate=safe */

 

 

 

Suppose a user lands on:

http://mydomain.com:/somepage?utm_campaign=111111

Users in the A group stay on whatever page they land on.

Users in the B group would be redirected to the new page but with utm_campaign=222222

 

By setting these up as one single experiment, you will be able to see only the aggregate of the A/B experiment across all utm_campaigns. (unless you take actions to create segments for each initial utm_campaign value).