0

I have over 100 tests on VWO with my commerce site. Usually, I can get the exact testing setup I need fairly quickly.

However I have a particular situation where I need to match 4 variables in a url that could appear in Random Order.

Here is how the URL's are structured:

1. https://www.website.com/buy/product-page?utm_x=utms&aid=12345&tid=12345678901234567890&productvarid=123

2. https://www.website.com/buy/product-page?utm_x=utms&aid=12345&tid=12345678901234567890

3. https://www.website.com/buy/product-page?utm_x=utms&aid=12345&productvarid=123

4. https://www.website.com/buy/product-page?aid=12345&utm_x=utms&tid=12345678901234567890&productvarid=123

5. https://www.website.com/buy/product-page?tid=12345678901234567890&utm_x=utms&aid=12345&productvarid=123


a. buy/product-page is a constant

b. utm's - ignore, those are basically referral and ad campaign tracking

c. aid - can appear anywhere in query string, this gives credit to aid for a product sale

d. productvarid=123 - can appear anywhere in query string, usually at end, this tells the page which product variation to offer

e. tid= - ignore - This can appear anywhere in query string, this is a unique hash 

generated per usersession

Goal: I must match and apply test to url begins with

https://www.website.com/buy/product-page
AND contains ?productvarid=123
AND contains ?aid=12345
AND exclude utm(.*) contains=test

but in any order

I can apply this to fixed order strigs, but havent had success doing variable order strings to successfully track a/b test on.

(I had to format this whole post as code because i'm getting unable to post error :( )

sorak
  • 2,607
  • 2
  • 16
  • 24
  • I googled VWO regex. I don't see any syntax for it. To do _out of order_ matching requires assertions OR conditionals. That would seem to be advanced. I mean, I could give you patterns for either/both but I don't think it has that capability. –  Mar 01 '18 at 19:38

1 Answers1

0

The easiest way to set this up would be to use the query parameter segmentation inside the VWO as shown below:

enter image description here

This way you won't have to take care of the ordering of these four query parameters.

Another alternative that I can think is to use the URL REGEX option and use the regex below:

enter image description here

REGEX : https\:\/\/www\.website\.com\/buy\/product-page\?(utm_x=.*|aid=.*|tid=.*|productvarid=.*)(utm_x=.*|aid=.*|tid=.*|productvarid=.*)(utm_x=.*|aid=.*|tid=.*|productvarid=.*)(utm_x=.*|aid=.*|tid=.*|productvarid=.*)

Eshan
  • 3,647
  • 1
  • 11
  • 14