The JotUrl engine offers 2 different methods to get parametric destination URLs. However, this feature is only available on paid plans and for tracking links created on custom domains. It is also necessary to enable the option that allows the transfer of parameters from the tracking link to the destination URL, by contacting our customer service.
Method 1: Transfer all parameters from the tracking link to the destination URL
When the option that allows to transfer parameters from the tracking link to its destination URL is enabled, all parameters passed to the tracking link are transferred to its destination URL.
If there is a correspondence between the name of a parameter passed to the tracking link with one already present in the destination URL, the value of the latter is modified with the corresponding value passed to the tracking link.
For instance, being domain.my/alias
the tracking link, with long.url/path?page=1
as its destination URL, we have:
domain.my/alias?param=value1
redirects to long.url/path?page=1¶m=value1
domain.my/alias?param=test
redirects to long.url/path?page=1¶m=test
domain.my/alias?page=2¶m=value2
redirects to long.url/path?page=2¶m=value2
domain.my/alias?page=3
redirects to long.url/path?page=3
domain.my/alias
redirects to long.url/path?page=1
Method 2: Parametric Destination URL
To create a parameterized destination URL you need to create a tracking link with the destination URL containing one or more parameters. The parameter can be inserted anywhere in the URL. The name of each parameter is delimited by double curly braces (e.g., {{param}}
). The parameter name also identifies the parameter passed to the tracking link.
For instance, suppose the tracking link domain.my/alias
has long.url/path/{{param}}
as its destination URL. By passing the parameter param
to the tracking link, its value is automatically substituted in the destination URL at {{param}}
.
Let's make some examples:
domain.my/alias?param=value1
redirects to long.url/path/value1
domain.my/alias?param=test
redirects to long.url/path/test
domain.my/alias?source=joturl
redirects to long.url/path/?source=joturl
domain.my/alias
redirects to long.url/path/
It is also possible to define a default value for the parameter param
which is alternatively considered empty. To define the default value, you need to add a vertical bar |
after the parameter name followed by the default value. For example long.url/path/{{param|to}}
.
In this case, the above examples would become:
domain.my/alias?param=value1
redirects to long.url/path/value1
domain.my/alias?param=test
redirects to long.url/path/test
domain.my/alias
redirects to long.url/path/to
Let's make some more sophisticated examples.
If the tracking link domain.my/alias
has long.url/path/{{a|id}}/{{b|0}}
as its destination URL, we have that:
domain.my/alias
redirects to long.url/path/id/0
domain.my/alias?a=page&b=pricing
redirects to long.url/path/page/pricing
domain.my/alias?b=12345
redirects to long.url/path/id/12345
domain.my/alias?a=index
redirects to long.url/path/index/0
Only when the parameters are used in the path/host of the destination URL, you can also use path and host modifiers that can be combined with each other::
- a parameter starting with
tr:
(e.g.,{{tr:abcd/}}
) implies deleting the indicated characters (e.g.abcd/
) from the end of the path of the destination URL, - a parameter starting with
tl:
(e.g.,{{tl:abcd/}}
) implies deleting the indicated characters (e.g.,abcd/
) from the beginning of the host of the destination URL, - a parameter starting with
d:
(e.g.,{{d:source}}
) causes that parameter to be removed from the destination URL..
For example, if the tracking link domain.my/alias
has {{sub}}.long.url/path/{{a}}/{{b}}{{tr:/}}{{tl:.}}{{d:c}}
as its destination URL, we have:
-
domain.my/alias
redirects tolong.url/path
(character/
to the right of the path is removed, character.
to the left of the host is removed) -
domain.my/alias?a=page&b=pricing&c=test&sub=www
redirects towww.long.url/path/page/pricing
(parameterc
is removed) -
domain.my/alias?b=12345
redirects tolong.url/path/12345
(character.
to the left of the host is removed) -
domain.my/alias?a=index
redirects tolong.url/path/index
(character/
to the right of the path is removed, character.
to the left of the host is removed)
A special case is obtained by using a numeric parameter (0, 1, 2, 3, 4, …) in the destination URL.
In this case, in order to pass the parameters to the destination URL it is sufficient to pass the parameter value as the path of the tracking link, e.g.:
domain.my/alias/param1/param2/param3
| | | |
{{0}} {{1}} {{2}} {{3}}
For example, if the tracking link domain.my/alias
has long.url/path/{{1}}/{{2}}
as its destination URL, we have:
domain.my/alias/test/page
redirects to long.url/path/test/page
domain.my/alias/test
redirects to long.url/path/test/
domain.my/alias
redirects to long.url/path/
As in the previous case, it is possible to define a default value for the numeric parameters.
For instance, if the tracking link domain.my/alias
has long.url/path/{{1|page}}/{{2|404}}#{{3}}
as its destination URL, we have:
domain.my/alias/test/page/rdr
redirects to long.url/path/test/page#rdr
domain.my/alias/test
redirects to long.url/path/test/404
domain.my/alias
redirects to long.url/path/page/404
WARNING: the parameters passed with this last method can contain only alphanumeric characters, any other character can lead to unpredictable behavior.
WARNING: parametric destination URLs are ignored by our link security monitor and advanced link content monitor (watchdog).
Questions? Please contact our customer service . We're happy to help!
Comments
0 comments
Article is closed for comments.