shlink icon indicating copy to clipboard operation
shlink copied to clipboard

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

Open lazmo88 opened this issue 4 years ago • 3 comments

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}} UTM_medium = email_{{device.browser}} UTM_campaign = {{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

lazmo88 avatar Jul 26 '20 22:07 lazmo88

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.

acelaya avatar Jul 29 '20 14:07 acelaya

@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:

  • Original referrer
  • Date/Time/Weekday (Redirects to time sensitive/specific pages)
  • Counters/stats of the link (You are lucky visitor number 404 😁)
  • Randomizer {rand:1-400} (Could allow you to create random page/image links for CMS)

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

lazmo88 avatar Aug 06 '20 00:08 lazmo88

Requires #819

acelaya avatar Aug 06 '20 05:08 acelaya