Link Template
The Link Template redirection type is more flexible and dynamic than the Destination URL. Instead of hardcoding a destination URL, you define a template with placeholders (variables), and those placeholders are replaced with dynamic values when the redirect happens. This approach allows you to build redirects based on patterns, making it easier to manage a variety of similar redirects without manually entering each URL.
How Link Template Works
In a Link Template, you can define a base URL with variables (placeholders) such as {tagId}
. When a user is redirected, these variables are replaced with real values.
For example, a Link Template might look like:
https://www.example.com/?tag={tagId}
When the redirect happens, {tagId}
will be replaced with the dynamic values provided at the time of the redirect.
Replacing Variables in Link Templates
There are two ways to replace the placeholders (variables) in a Link Template:
- Value (direct): You provide a fixed string value for the variable.
- Value From: You assign the value from a query parameter or an attribute.
These two methods allow flexibility depending on whether you want the variable to always have the same value or if you need it to change dynamically based on user input or query parameters.
Example:
In the above screen, the Link Template is https://www.example.com/?tag={tagId}
. In this case, {tagId}
is the variable which is replaced with test-tag-01
.