Using a Merge Field in a Link
  • 02 May 2025
  • 1 minute read
  • Dark
    Light
  • PDF

Using a Merge Field in a Link

  • Dark
    Light
  • PDF

Article summary

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:

  1. Go to Deliver.  

  2. Select an existing email message, or create a new one.

  3. Select Edit Recipient Lists.

  4. Configure the recipient list as needed.

  5. In the recipient list query, select Subquery Export.

  6. 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.

  7. Select Save.

  8. Use the breadcrumb navigation to return to the message overview page.

  9. Select Edit Message.

  10. Select the link icon, or press ctrl/cmd + K.

  11. 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, like https://. Otherwise, select the appropriate link protocol from the list.

    • URL: Enter the merge field for the link, for example {{login-link}}

  12. Select OK.

  13. 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.


Was this article helpful?