Expand my Community achievements bar.

SOLVED

A/B test - Redirect to the same URL with different custom header values

Avatar

Level 1

Hello Team,

 

In our solution we use custom header to indicate API version and we need to include this header into A/B requests. So, we are trying to create AB test which will be target to the same url with different header values.

For example:

https://www.example.com/shop/checkout

  • headers=[api-version=1]

  • headers=[api-version=2]

Any idea/solution or recommendation?  Thank you in advance. 

 

Thanks

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @pyakym 

 

I assume that when you say header values you're referring to URL parameters? (if you mean actual headers, scroll to my bottom comment )

e.g.
abc.com/shop/checkout?headers=1
abc.com/shop/checkout?headers=2

 

In the VEC navigate to the page delivery options:

Screenshot 2024-06-09 at 14.18.06.png

 

 

 

 

 

 

 

Click + Add a template Rule

 

And create logic to target multiple pages. Examples:
URL contains shop/checkout
URL contains ?headers=

 

This should ensure that you provide the same experience across different URLs/api versions. 

 

 

If you by headers mean actual headers like response headers, then having different values in these shouldn't be a problem as Target will evaluate based on the URL and not the headers returned for the domain.

Let me know if I'm missing something obvious and the above isn't what you're looking for.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @pyakym 

 

I assume that when you say header values you're referring to URL parameters? (if you mean actual headers, scroll to my bottom comment )

e.g.
abc.com/shop/checkout?headers=1
abc.com/shop/checkout?headers=2

 

In the VEC navigate to the page delivery options:

Screenshot 2024-06-09 at 14.18.06.png

 

 

 

 

 

 

 

Click + Add a template Rule

 

And create logic to target multiple pages. Examples:
URL contains shop/checkout
URL contains ?headers=

 

This should ensure that you provide the same experience across different URLs/api versions. 

 

 

If you by headers mean actual headers like response headers, then having different values in these shouldn't be a problem as Target will evaluate based on the URL and not the headers returned for the domain.

Let me know if I'm missing something obvious and the above isn't what you're looking for.