Transfer Query Parameters from Original to a Variation that also has Query Parameters

THIS ARTICLE WILL HELP YOU:



If you want to do a Split Test where your original URL may have query parameters that you want to be passed onto the variation, and your variation already has its own query parameter that you want to retain, you have to set this up a little differently than you normally would. Otherwise, what you would end up with is a variation URL that looks like this:

http://www.mysite.com?query1=param1?query2=param2 (note the second ? which is incorrect)

The above would be incorrect, as what you really want is this:

http://www.mysite.com?query1=param1&query2=param2 (note the & which appends the second parameter)

Example Configuration

Locations

Page URL Matches exactly http://www.mysite.com 

Note that selecting "Page URL" means that it will work whether the URL that should trigger the experiment contains query parameters or not. You only need to use Page URL (w/Query) if you want to match *specific* query parameters. Also, "Matches exactly" may not be right for your situation, this is only an example.

AND

Query String does not contain query=param

Note - this excludes the query parameters that already exist in your variation.  Replace query=param with your specific parameter.

Edit Split Url Variations

Original Url

https://www.mysite.com/([^\?]+)?\?{0,1}(.*)$

Options

Support Regular Expressions - checked on

Transfer Original URL Variables to the Variation URL - checked on

Show variation RegEx - checked on

Variation URL

http://www.mysite.com/VIDEO/?query=param&$2

keywords: attribution