1.0.6 • Published 2 years ago

param-js v1.0.6

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

param.js

Simple script that allows you to share short link like example.com?i and redirect user to anything you want (ex. example.com?utm_source=instagram&utm_medium=bio&utm_campaign=inst)

Why

We often have to share our link. Put them in bio, send with messages, attach them to posts. And sometimes we have to put some URL parameters. Like UTM codes. They're clumsy, looooong and they overshadow what we really want to show: our perfect beautiful website address.

qurle.net?utm_source=github&utm_medium=param-js-readme&utm_campaign=paramjs is yuck.

qurle.net?g is much better.

How to use

Just import and call once!

import Params from 'paramsjs'
...
Params(redirect)

Parameters

Here's and example of your redirect object:

redirect = {
    "s": "utm_source=test&utm_medium=test&utm_campaign=test",
    "e": "utm_source=email&utm_medium=sign&utm_campaign=email",
    "f": "utm_source=figma&utm_medium=bio&utm_campaign=figma",
    ...
}

This means that example.com/whatever?e will redirect to example.com/whatever?utm_source=email&utm_medium=sign&utm_campaign=email

Problem? Idea? Kind words?

I accept feature suggestions and ideas to improve this script. Or you can contact me via e-mail at nick@qurle.net or at qurle.net/contact.

<3

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago