Forum Discussion
Link Alias Issues in Content Blocks
Given that you manage 16 franchise brands with hundreds of live emails, here’s the recommended solutions:
Solution 1:
For major updates, consider using the Braze API for efficiency.
Embedding Link Aliases Directly in HTML
You can specify a link alias in your HTML content blocks by using the data-link-alias attribute. This way, Braze automatically recognizes and applies the alias when the email is sent. For example: <a href="https://www.example.com" data-link-alias="footer-link">Visit Our Website</a>
Solution 2:
Use Dynamic Content in Content Blocks
Leverage Braze's Liquid syntax to dynamically generate aliases based on context (e.g., brand name, email type). Here's an example:<a href="https://www.example.com/{{brand_name}}" data-link-alias="footer-link-{{brand_name}}">Visit {{brand_name}}</a>
How It Works:
Replace {{brand_name}} with a variable that corresponds to the brand or franchise name.
This dynamically adjusts both the link URL and alias based on the specific campaign or brand.
Solution 3:
Use Global Variables or Custom Attributes to manage common links and aliases centrally:
Steps:
Create global variables in Braze to store standard links and alias names.
Reference these variables within your content blocks or email templates using Liquid syntax.
Example:
Define footer_link_alias as a global variable:
<a href="{{footer_link}}" data-link-alias="{{footer_link_alias}}">Learn More</a>
- kayla_upton2 months agoPractitioner II
I'm trying to add the data-link-alias directly into the HTML since that would allow me to make the updates without needing to involve IT. I made a duplicate copy of one of our footer content blocks and added the alias name to a few of the links, but it's not working with any of the adjustments I've made.
Here are the steps I've tried:
- Added data-link-alias="name" into the anchor tag in different locations like directly after the href"", before it, after the style elements, etc.
- I tried to remove the {{campaignn${name}}} liquid variable from the URL and manually type the utm_campaign parameter, just in case that was causing issues.
- When I noticed the alias was not being recognized in the campaign content editor under the link management tab, I launched the email as live campaign to myself. I sent it to my work email and personal email and clicked all the links I put the alias name on, but when I went back to view the campaign analytics, the link aliases still did not show up with data-link-alias element that I put in the HTML, even after deploying the campaign. It's still defaulting to the cblink_# name.
- I even tried changing the link ID number that Braze assigns to the link alias name (I knew that likely wouldn't work because they aren't the same thing, but I was really trying to exhaust all my options before giving up haha).
- I created two more duplicates of the campaign and changed various settings, like turning off in-line CSS, checking and unchecking the link aliases checkbox that enables the link tracking under link management on the campaign.
- No luck on any of my attempts to troubleshoot.
Could you take a look and let me know if you see any culprits? Here's a screenshot of the campaign analytics click tracking report showing that none of the aliases showed up as named in the HTML - and a screenshot of a couple of the links in the HTML of the content block. Only one of the links is highlighted in my screenshot, but both links in the HTML section shown have a data-link-alias appended.
Related Content
- 10 months ago
- 10 months ago
- 2 years ago
- 6 months ago