Skip to main content
Dittofeed comes with a number of built-in liquid tags, filters. These are available to use in your templates. These serve as useful utility functions for rendering messages.

Tags

The unsubscribe_link tag outputs a link to unsubscribe from the message’s subscription group.
{% unsubscribe_link %}
This renders a link of the form,
<a class="df-unsubscribe" clicktracking=off href="..." target="_blank">unsubscribe</a>
This tag is only usable in templates used within a journey message node that has been assigned a subscription group, and will otherwise produce an empty href. The link’s text can also be overridden by passing a parameter to the tag e.g.
You can unsubscribe by clicking {% unsubscribe_link here %}.
Including an unsubscribe_link is critical for marketing emails, for both legal and user experience reasons. It should be included in the footer of your email, along with your company name, and address e.g.
<mj-text align="center" color="#525252">
  MyCompany, Inc., 40 Rosewood Lane, New York, NY 10003
  <br/>
  <br/>
  Don't want to receive these emails? You can {% unsubscribe_link %} from them here.
  <br/>
  <br/>
  Powered by <a href="https://dittofeed.com" target="_blank" rel="noopener noreferrer">Dittofeed</a>.
</mj-text>

unsubscribe_url

If you need to customize the unsubscribe link, you can use the unsubscribe_url tag to only output the URL.
<a class="df-unsubscribe" clicktracking=off href="{% unsubscribe_url %}" target="_blank">unsubscribe</a>
The subscription_management_link tag outputs a link to the subscription management page without automatically unsubscribing the user. This allows users to manage their subscription preferences manually.
{% subscription_management_link %}
This renders a link of the form,
<a class="df-subscription-management" clicktracking=off href="..." target="_blank">manage subscriptions</a>
The link’s text can also be overridden by passing a parameter to the tag e.g.
You can {% subscription_management_link manage your subscription preferences %}.
This tag is useful when you want to provide users with access to subscription management without automatically changing their subscription status upon page load.

Channel Display Behavior

The subscription management page accessed via this link will always show subscription groups for all channels, allowing users to comprehensively manage their preferences across email, SMS, and other messaging channels.

subscription_management_url

If you need to customize the subscription management link, you can use the subscription_management_url tag to only output the URL.
<a class="df-subscription-management" clicktracking=off href="{% subscription_management_url %}" target="_blank">manage subscriptions</a>
This tag follows the same channel display behavior as subscription_management_link - always showing subscription groups for all channels.

view_in_browser_url

The view_in_browser_url tag outputs a URL that allows recipients to view the email in their web browser. This is useful for users whose email clients may not render the email correctly.
{% view_in_browser_url %}
This renders a URL that can be used in a link:
<a href="{% view_in_browser_url %}" target="_blank">View in browser</a>
This feature requires blob storage to be enabled. The rendered email HTML is stored in blob storage when the message is sent, and the URL provides secure access to view it.
Example usage in an email header:
<mj-text align="center" color="#888888" font-size="12px">
  Having trouble viewing this email? <a href="{% view_in_browser_url %}" target="_blank">View in browser</a>
</mj-text>
For more details, see the View in Browser guide.