Want your emails to always contain a certain Link Trigger? Rather than having to add your Link Trigger manually to each email you send, you can add it to your email templates instead.
This feature is handy if you want to add Tags to subscribers who click links that are always featured in your emails. For example, you may want to tag subscribers with a "Newsletter" Tag when they click a "Subscribe to my newsletter" link in your email footer.
First things first: This tutorial is for after your Link Trigger has already been created. If you need help with that, please follow this tutorial first, and come back when it's ready.
How to get started
The first order of business is to find your link trigger's ID. Let’s walk through that process.
1. Create a new Broadcast using the visual email editor
2. Add your link to the Broadcast content
Type some text in the email editor (it doesn't matter what—we'll be deleting this draft once we have the ID we need).
Highlight the text and click the link icon in the toolbar at the top of the email editor. Next, select your Link Trigger from the Link Trigger dropdown (make sure you've created your Link Trigger already—here's how).
3. Preview the Broadcast
Once your Link Trigger has been added, click the Preview email option to preview your Broadcast:
Your email will pop open with a browser preview window. Here you’ll want to right-click on the link, then click Inspect (Right-click > Inspect):
4. Locate your Link Trigger's ID
In the window that pops up, you're going to find your trigger ID. Don’t worry if this window looks super code-heavy, this will be easier than it seems!
You can find the Link Trigger ID here (your number will be different):
In the image above, the trigger ID number is 3367666.
Once you've found your trigger ID number, be sure to save it somewhere you can access it again, because we'll be using it later (we suggest copying it to your clipboard).
6. Delete the Broadcast draft
As long as your Link Trigger's ID is saved somewhere, we no longer need this Broadcast draft, so feel free to discard it!
Now we're ready to add this Link Trigger to our email template. Please follow the steps in one of the following sections of this tutorial, based on whether your template is a starting point or classic template, or an HTML email template.
Your email template will state what type it is on the Email Templates page, under its name.
How to add a Link Trigger to a starting point or classic template
1. Navigate to the email template you want to add the Link Trigger to.
Click the template you'd like to modify from your account's Email Templates page.
2. Add an HTML block where you want to add your Link Trigger.
In this case, we want to add a Link Trigger in the email footer, so we're going to add an HTML block there:
3. Click 'Edit' on your HTML block and add this code:
<a href="YOUR-URL-HERE" trigger-id="YOUR-LINK-TRIGGER-ID">Your link text here</a>
Replace the indicated values with your own Link Trigger's URL and ID, as well as the text you'd like displayed for the link. If you'd like, you can also add CSS styling to this same HTML block to style your Link Trigger.
Here’s an example of what that might look like using the trigger ID number 3367666 (remember, your number will be different):
When you're done, click the Save button on the HTML block.
4. Save the changes to your template
Save the changes to your template via the Save button at the top right of the page, and that's it!
☝️ NOTE: Adding a Link Trigger via an HTML block means that it won't have any default styling associated with it. As a result, it will probably look quite plain by default.
However, you have the option to add CSS code to the same HTML block to style your Link Trigger's appearance—we have a guide to that here.
How to add a Link Trigger to an HTML email template
1. Navigate to your template's editor
Click the template you'd like to modify from your account's Email Templates page.
2. Add this code where you'd like your Link Trigger to appear:
<a href="YOUR-URL-HERE" trigger-id="YOUR-LINK-TRIGGER-ID">Your link text here</a>
Replace the indicated values with your own Link Trigger's URL and ID, as well as the text you'd like to display for the link.
You can also add inline styles or CSS to style your link trigger, and use the Preview Layout button to preview your changes.
3. Save the changes to your template
When you're ready, click the Save button at the bottom-right of the page, and that's it!