shlinkio / shlink

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

Allow to specify dynamic query params that are appended to long URL before redirection #815

Open lazmo88 opened 4 years ago

lazmo88 commented 4 years ago

Feature idea: Option to specify UTM tags within the GUI and save "collections" or "templates" of UTM tags so they can be easily reused. Further on extending to "dynamic" UTM tags, where variables such as OS, Browser, Language, Geo City/Country etc. Could be dynamically appended to the UTM tags of the link.

Dynamic UTM tags example: UTM_source = {{device.os}} UTMmedium = email{{device.browser}} UTMcampaign = {{geo.country}}{{geo.city}}

These would be then appended to the long.url/path?{{all_utm_tags}}

Same variables could be utilized with conditional redirects as discussed on #366

acelaya commented 4 years ago

Hmm, I like the idea. It could even be used to drive any kind of query arguments, not only UTM ones.

Only problem is that some of the placeholders cannot be determined in all the cases.

For example, geolocation is currently happening "after" the user is redirected, therefore, country, city, etc are not yet known.

However, I plan to change that, so this would be eventually possible.

lazmo88 commented 4 years ago

@acelaya custom dynamic parameters vs standard UTM tags is much more versatile option. I could see affiliate marketers loving this.

Re:placeholders, there might be a minor hit on the performance (link responsiveness/redirect time) if there is multiple placeholders that requires processing. Yet, if these processes are only running when such placeholder is present, it shouldn't be an issue.

Further ideas for placeholders:

A lot of fun stuff could be created with the placeholders :)

acelaya commented 4 years ago

Requires #819

mredodos commented 1 day ago

Some news about that features?

acelaya commented 1 day ago

Some news about that features?

Image

Image