Unroll URLs and remove their tracking parameters
This package can be installed by adding clean_unroll to your list of
dependencies in mix.exs:
def deps do
[
{:clean_unroll, "~> 0.1"}
]
endiex> CleanUnroll.clean_unroll("https://t.co/shortened-tracked")
{:ok, "https://example.com/page?custom_param=value"}
iex> CleanUnroll.clean_unroll("https://t.co/shortened-tracked", ["custom_param"])
{:ok, "https://example.com/page"}
iex> CleanUnroll.clean("https://example.com/page?utm_source=twitter&id=123")
"https://example.com/page?id=123"
iex> CleanUnroll.unroll("https://t.co/shortened")
{:ok, "https://example.com/page"}CleanUnroll is released under the Apache License 2.0.
This package was written by Elliot Jackson.
- Blog: https://elliotekj.com
- Email: elliot@elliotekj.com