https://www.growthbook.io/ logo
s

strong-receptionist-72327

03/02/2023, 3:33 AM
Does growthbook support split url testing for websites?
f

fresh-football-47124

03/02/2023, 3:34 AM
Hi Himanshu - it is possible to do, but we don’t have something as simple as a ‘url’ type, as there can be complications with this
s

strong-receptionist-72327

03/02/2023, 3:38 AM
so how can we achieve this?
f

fresh-football-47124

03/02/2023, 3:44 AM
what is your tech stack?
if its a website, you can use the JS SDK and pass down a string, and then redirect to that url - or just code in the two variations
eg:
Copy code
if (gb.isOn("my-feature")) {
  window.location = someurl
}
or something like
Copy code
const flagValue = gb.getFeatureValue("my-feature", "");
if (flagValue.startWith("http")) {
  window.location = flagValue;
}
just be careful with the cases - a variation with an extra redirect may perform differently just by having one more redirect
s

strong-receptionist-72327

03/02/2023, 5:42 AM
ok thanks this helps
15 Views