Link Replacements
Overview
Link Replacements provide a mechanism for modifying the destination and/or expiration of a SimpleMH link after the email has been sent.
Link Replacements are performed at the time of the click. The purpose of this is to allow links with mistakes in them to be fixed, or to shut down links that are being abused.
Link Replacements can be configured via the UI or the API.
Attributes
The following are the configurable attributes defined for Link Replacements.
Mail Class |
When configured, this link replacement will only affect clicks associated with the specified Mail Class. The comparison is made case-insensitively. If a Mail Class is set for a Link Replacement, and that Mail Class is deleted, the Link Replacement will be deleted as well. Link Replacements associated with a specific Mail Class do not appear on that Mail Class’s “References to This Mail Class” table. May be no longer than 100 characters. |
InstanceID |
When configured, this link replacement will only affect clicks associated with the specified InstanceID. The comparison is made case-insensitively. In order to specify InstanceID, Mail Class must be set. May be no longer than 300 characters. |
Notes |
User-defined text description of the purpose of this link replacement. May be no longer than 512 characters. |
Match Type |
The match type to perform when determining if this link replacement affects a particular click.
|
Match Text |
The string to use when comparing for match types of May be no longer than 10240 characters (we don’t recommend having URLs this long). |
Link ID |
The string to use when comparing for match type of |
Rewrite links that match the above criteria |
Specify that you want to rewrite links that match this Link Replacement. |
Replacement URL |
The new URL to use in place of the original URL. If this is blank, no replacement will be made. May be no longer than 10240 characters (we don’t recommend having URLs this long). |
Use capture references (\1 through \9) when replacing the URL |
If match type is
|
Expire links that match the above criteria |
Specify that you want to rewrite the link expiration time. |
Expiration Time |
If this link replacement matches for a click, and the current time has passed the value
for Expiration Time, the user will be presented with the message |
Link Replacement Uniqueness
Link Replacements must be unique for their matching criteria – this means that only one Link Replacement can exist for any given combination of Mail Class, InstanceID, Match Type, Match Text, and Link ID.
Link Replacement Priority
Link Replacements are evaluated from most-specific to least-specific mailclass
and instanceid
settings:
- Mail Class and InstanceID is set
- Mail Class is set, InstanceID is not set
- Mail Class and InstanceID are not set
Additionally, if multiple matches are found, ties will be broken by specificity of the match_type
:
Match by linkid
Exact match
Regular expression
All links
If there’s still a tie after the above evaluations, the earliest created (lowest id
)
Link Replacement will be used.