shlinkio / shlink

The definitive self-hosted URL shortener
https://shlink.io
MIT License
3.36k stars 277 forks source link

Feature to configure a split URL, e.g. for A/B testing #1898

Open Moongazer opened 1 year ago

Moongazer commented 1 year ago

Summary

Configure a short-URL redirecting with split to two or more different target-URLs, and defining a percentage for random distribution, e.g.:

Short URL: https://s.domain.net/abc123
Target 1 50%: https://my-target-site.net/campaign-1a
Target 2 50%: https://my-target-site.net/campaign-1b

Short URL: https://s.domain.net/xyz123
Target 1 33%: https://my-target-site.net/campaign-2a
Target 2 33%: https://external-site-builder.net/campaign-2b?utm_source=xyz123
Target 3 33%: https://my-target-site.net/campaign-2b-version4

Use case

Lets say you have a print-media campaign where a link (as QR) is distributed country wide. Obviously it would be difficult to spread two different print-media version each having its own QR-code.

But having the option to define different target-URLs which are split randomly by a given distribution value, one could analyse which of the targets having the best conversion rate. Later on a winner URL can be selected (manually, or bonus: automatically after time X), from then the redirect goes only the target with the best conversion rate.

Discussion welcome, appreciate your feedback.

acelaya commented 1 year ago

I had the feeling something similar had been discussed in the past, so I searched a bit and found this https://github.com/shlinkio/shlink/issues/366

There were a few people interested in something similar, and it would definitely be something nice to have and valuable for Shlink.

However, I closed that issue around 1 year ago, with no explanation why (thanks past me for not providing context on decisions made), but I strongly suspect I ended up closing it due to lack of capacity to implement a relatively complex feature.

And that's precisely my main concern. This is quite complex to do in a right, performant and non-risky way.

This kind of features have the potential to introduce bugs or edge cases hard to maintain in the long term.

That's why I'm going to keep it open, but I can't promise to have this done soon (there's already a more than a year backlog of tasks among all Shlink ecosystem projects).

I'll mark it as "Gold", and if there's a sudden spike on project supporters, it might escale-up in the backlog queue.

acelaya commented 7 months ago

For those ending up here, please, vote in this discussion https://github.com/shlinkio/shlink/discussions/2101