AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

4.1K members online now
4.1K members online now
Learn how to create your first experiment and get tips on creating A/B, redirect, and multivariate tests.
Guide Me

A/B Test Unique URLs

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

When a new user tries to use our platform, they're sent through an onboarding process that gives each user a unique URL (ex: The bolded users ID is always unique for each new user. Is there a way I can I set up A/B tests on these pages even though each one will have a unique URL?

Re: A/B Test Unique URLs

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Assuming "create/user" and "?is_new=true" are always present, and only present for the pages you are looking to target then copy and paste the code below into your targeting condition.



var newUser = {
	init: function(){
		if(newUser.preUniqueID && newUser.postUniqueID){
			return true;
		} else {
			return false;
	preUniqueID:  window.location.href.indexOf('create/user')>-1,
	postUniqueID: window.location.href.indexOf('?is_new=true')>-1


To set this up, go to the Targeting tab in your experiment then go then add a Custom JavaScript condition. Inside Custom JavaScript, click on Variable then click Create new... and paste the code in there. Now set the Values to true then click Add. You should be set now.