- 02 May 2025
- 1 minute read
- Print
- DarkLight
- PDF
Using a Merge Field in a Link
- Updated 02 May 2025
- 1 minute read
- Print
- DarkLight
- PDF
You can create links in email communications such that the destination URL is determined by the value of a merge field.
These links can be used to create personalized login URLs for account registrations, password resets, or recommendation requests.
đź“–Further reading: Learn how to customize links with query string parameters.
Creating a merge field link in a Deliver mailing
To add a merge field to a URL:
Go to Deliver.
Select an existing email message, or create a new one.
Select Edit Recipient Lists.
Configure the recipient list as needed.
In the recipient list query, select Subquery Export.
Configure the following:
Name: Name the subquery export something descriptive, like
login-link
.Type: Dependent subquery
Output: Concatenate
Exports: Create two exports:
Literal: A literal representation of the desired URL up through the query string parameter, like
https://apply.slate.edu/account/login?id=
.
📝 Note: We’ve hard-coded the protocol,https://
, in the literal. Whether you do so is up to you.Export: Select the unique ID to be appended to the literal.
Select Save.
Use the breadcrumb navigation to return to the message overview page.
Select Edit Message.
Select the link icon, or press
ctrl/cmd + K
.Configure the following settings:
Display text: Enter the link’s display text.
Link type: URL
Protocol:
<other>
📝 Note: This assumes your subquery export includes a hard-coded literal for the protocol, likehttps://
. Otherwise, select the appropriate link protocol from the list.URL: Enter the merge field for the link, for example
{{login-link}}
Select OK.
Configure the remaining message text, then select Save.
Avoid deliverability issues by always linking plain text
Avoid adding a link to a merge field that inserted in the body of the message. For example, inserting the merge field {{login-link}}
to the message body, highlighting it, selecting Link, and entering {{login-link}}
as the URL. This introduces issues because Deliver re-formats the link to track clicks.
If the text appears to contain a URL (e.g., university.edu) that differs than the destination (e.g., mx.technolutions.net, which Deliver uses for click-tracking), email clients may issue a warning and your messages may be less deliverable as a result.
Avoid these issues by only adding links to plaintext, as described in this article.