A/B test - Redirect to the same URL with different custom header values | Community
Skip to main content
June 7, 2024
Solved

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

  • June 7, 2024
  • 1 reply
  • 769 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kandersen-1

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:

 

 

 

 

 

 

 

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.

1 reply

kandersen-1
Community Advisor
kandersen-1Community AdvisorAccepted solution
Community Advisor
June 9, 2024

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:

 

 

 

 

 

 

 

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.

Test forum signature