Skip to content

Braze Learning courseLink aliasing

Use link aliasing to create recognizable, user-generated names to identify links sent in email messages from Braze. These links are available for segmentation retargeting, action-based triggering, and link analytics.

With link aliasing, you can create user-generated names to identify and track links sent in emails. This way, you can efficiently use these recognizable link aliases in your emails to track engagement and analyze campaign performance, without needing to reference the full link.

With link aliasing, you can:

  • Retarget users who have clicked specific links: Identify and target users who have clicked a link.
  • Create action-based triggers: Send an email when a user clicks a link.
  • Analyze metrics: Compare how many users have clicked Link A versus Link B.

How it works

Braze uniquely identifies links within emails by appending an extra parameter called the lid (also known as the link identifier) to every link URL. This lid value allows Braze to track, monitor, and aggregate user interactions with the link even if the rest of the URL parameters may differ. This helps to provide insights into how users engage with the content in your email campaigns.

To create a link alias, follow these steps:

  1. In your campaign or Canvas component, go to your email body.
  2. Select the Link Management tab.
  3. Braze automatically generates unique default link aliases for each of your links.
  4. Give the alias a name. Aliases must be uniquely named per email campaign variant or Canvas component.

You can also set an alias that will be used to reference a specific link when dealing with reporting or segmentation.

Link Management page with four link aliases.

To view all of your tracked link aliases, do the following:

  1. Go to Settings > Email Preferences under Workspace Settings.
  2. Select the Link Aliasing Settings tab.

Here, you can sort, search, and turn off tracking for link aliases.

Tracked Link Aliases page that shows two link aliases named "TechPartners" and "Help" that are associated with a campaign named "Email_Survey".

Braze recommends evaluating the links within the email, adding link templates, and providing a naming convention that works for segmentation and reporting purposes. This helps you keep track of all links.

When link aliasing is turned on, messages, Content Blocks, and link templates are not modified. Any existing messages using link templates or Content Blocks will be the same. However, when you update a message, link alias markup will apply to all of the links, so you’ll need to reapply the link templates for the links to be visible.

The following tables provide examples of links in an email body, link aliasing results, and explanations for how the original link is updated with link aliasing.

Logic: Braze inserts a question mark (?) and adds the first query parameter into the URL.

Logic: Braze detects other query parameters and appends lid= to the end of the URL.

Logic: Braze recognizes a link is a URL and already has a question mark (?) present, so the lid query parameter is appended after the question mark.

Logic: Braze expects the URL to use a standard structure where anchors (#) are present after a question mark (?). Because Braze reads from left to right, the question mark and lid value are appended before the anchor.

Logic: When using link aliasing with URLs that contain anchors (#), Braze expects the anchor to be placed after the query parameters. This means that the lid value must be appended before the anchor for proper tracking, and since Braze reads the URL from left to right, the question mark (?) and lid should come before the anchor.

In the Link Management tab, select which aliases you would like to be “tracked” for segmentation purposes and to be present in segmentation filters. Note that tracked aliases are only for segmentation purposes and will have no impact on your link being tracked for reporting purposes.

Braze allows you to select unlimited links to track, though you may only retarget users on the most recent links they have opened. User profiles include their 100 most recently clicked links. For example, if you track 500 links and a user clicks on all 500 of them, you can retarget or create segments based on the 100 most recently clicked links.

Link Management tab of the Drag-and-Drop email editor.

Link Management tab of the HTML email editor.

Action-based filters

You can create action-based messages targeting any link (tracked or not tracked) or retarget users based on if they clicked an alias across any email campaign or Canvas component.

Action-Based Options to target users who have clicked an alias in a Canvas component or interacted with a campaign.

Segmentation filters

In Braze, if you have a link alias in your email and a user clicks on it, the event is recorded in the user’s profile with the alias.

If you use the “Clicked Alias in Any Campaign or Canvas Step” segmentation filter and later decide to rename this link alias, the previous click data in the user profile will not be updated, meaning it will still show as the previous link alias. So, if you target users based on the the new link alias, it will not include the data from the previous link alias.

If you use the “Clicked Alias in Campaign” or “Clicked Alias in Canvas” segmentation filter, this will filter your users by whether they clicked a specific alias in a specific campaign or Canvas. If multiple users share the same email address and the link alias is clicked, all other users who share the email address will have their user profiles updated.

The following segmentation filters apply to click events that are tracked at the time the event is processed. This means untracking links won’t remove existing data and tracking a link won’t backfill the data. For more details, see Segmentation filters.

Untracking a link won’t reallocate existing segments with the filter to the untracked alias. The old data will remain on the user profiles until it’s replaced by newer data.

For segmentation purposes, only 100 links can be tracked per workspace by default. Links in archived messages are automatically untracked. However, if archived messages are unarchived, the links will need to be tracked again. When link aliases are tracked, link reporting is indexed by the alias instead of top-level domains or full URLs.

Campaign Analytics tab that displays three link aliases and their total clicks.

Email clicks event

If you export your engagement data with Currents, an email click event will be slightly different if you have link aliasing enabled. It will have two additional fields for the email clicks event when link aliasing is turned on: link_id and link_alias.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Email Click: users.messages.email.Click
{
  "id": (string) unique ID of this event,
  "user_id": (string) Braze user ID of the user,
  "external_user_id": (string) External ID of the user,
  "time": (int) 10-digit UTC time of the event in seconds since the epoch,
  "timezone": (string) IANA time zone of the user at the time of the event,
  "campaign_id": (string) ID of the campaign if from a campaign,
  "campaign_name": (string) name of the campaign,
  "message_variation_id": (string) ID of the message variation if from a campaign,
  "message_variation_name": (string) the name of the message variation if from a campaign,
  "canvas_id": (string) ID of the Canvas if from a Canvas,
  "canvas_name": (string) name of the Canvas,
  "canvas_variation_id": (string) ID of the Canvas variation the user is in if from a Canvas,
  "canvas_variation_name": (string) name of the Canvas variation the user is in if from a Canvas,
  "canvas_step_id": (string) ID of the step for this message if from a Canvas,
  "canvas_step_name": (string) name of the step for this message if from a Canvas,
  "send_id": (string) ID of the message if specified for the campaign (See Send Identifier under API Identifier Types),
  "dispatch_id": (string) ID of the message dispatch (unique ID for each 'transmission' sent from the Braze platform). Users who are sent a schedule message get the same dispatch_id. Action-based or API-triggered messages get a unique dispatch_id per user.,
  "email_address": (string) email address for this event,
  "url": (string) the URL that was clicked (Email Click events only),
  "user_agent": (string) description of the user's system and browser for the event (Email Click and Open events only),
  "ip_pool": (string) IP pool used for message sending,
  "link_id": (string) unique value generated by Braze for the URL,
  "link_alias": (string) alias name set when the message was sent
}

New Content Blocks will have their links modified where Braze will append a lid= to each link where applicable. This placeholder value is resolved when inserted into an email message variant.

To modify the links within existing Content Blocks that were created before Braze enabled link aliasing, duplicate the existing Content Blocks, then modify the links within the duplicated Content Blocks.

When a Content Block without a lid value is inserted into a new message, the links from that Content Block are not tracked with an alias. When a new Content Block is inserted into an “old” message variant, the links from that message variant will be recognized by link aliasing. Links from the Content Block are also recognized. However, “old” Content Blocks cannot nest “new” Content Blocks.

For URLs that are generated by an assign statement in the HTML or in a Content Block, we recommend adding a question mark (?) into the anchor tag. This will help Braze append query parameters (lid = somevalue) so link aliasing can work properly. Without identifying where to append query parameters, link aliasing will not recognize these URLs.

Example

Check out this link aliasing example for the recommended formatting of the anchor tag:

1
2
3
{% assign link1 = "https://www.braze1.com" %}

<a href="{{link1}}?">Click Here</a>

If the link has parameters within it that contain a question mark (?), you can replace it in the anchor tag with an ampersand (&), such as in this example:

1
2
3
{% assign link_with_params = "https://www.braze1.com?param_1&param_2" %}

<a href="{{link_with_params}}&">Click Here</a>
HOW HELPFUL WAS THIS PAGE?
New Stuff!