There are several options for enabling and using our Link Tracking feature. You can track links at the Server level (tracks links for all emails sent from a particular Postmark Server) or Message level (track links for individual emails manually). Both of these options allow you to also choose whether to track links in HTML emails, Plain Text emails, or both.
Please note, individual messages sent through the API or SMTP may override the Server level setting for link tracking. For instance, if the Server has link tracking off, an individual message can be tracked with the Postmark API at time of sending if TrackLinks is set to HtmlAndText.
To track all email sent through a particular Server:
- Choose the Server you wish to track emails on.
- Go to the Settings for the Server.
- Scroll to the bottom of the page, there is an option to enable Link Tracking.
This will enable Link Tracking for all emails sent from this Server. This option will track links for all emails sent from this Server by default.
Once enabled, you will then have the option to track links in HTML or Plain Text emails. By default, links in both HTML and Plain Text emails will be tracked when you enable Link Tracking. You can also disable link tracking for HTML or Plain Text emails here:
All emails from this Server will now have their links tracked for the email types chosen by default. See below for details on how you can override these defaults at an individual email level.
sending using the API, you can set the Link Tracking behavior at the individual email level using the
“TrackLinks” field. Options for this field are:
"TrackLinks": "HtmlAndText"— tracks links in both the HTML and Plain Text parts of the email
"TrackLinks": "None"— do not track any links
"TrackLinks": "HtmlOnly"— only track links in the HTML part of the email
"TrackLinks": "TextOnly"— only track links in the Plain Text part of the email
"TrackLinks": null— do not specify a value, uses the default for the Server
Disable Tracking for Specific Links
If you are tracking links in HTML emails, you can also opt out specific links by adding an attribute with value
data-pm-no-track to the link. For example, this link will not be tracked:
<a data-pm-no-track href=\"http://www.somedomain.com\">This link won't be tracked.</a>