Add Links
Links can be added to the Content Block as well. Depending on the syntax used, links will be tracked or not when used in a message.
Data-link attribute for tracking purposes
To create a tracked link, add the data-link attribute to the syntax and provide a name for it.
Example:
<a href="" data-link="Website">
In the below example, it looks like the following:![]()
When the Content Block is used in the message, the link appears on the right, in the Links panel.![]()
Note: Use of the anchor # tag in a data-link attribute is not permitted.
When a Content Block with links is added to a message, the tracked links will be listed on the Links tab of the message. The name given to the data-link attribute is the one displayed on the Links tab when the Content Block is used in a message. If the same Content Block is used multiple times in the same message, distinct links will be created for each time the Content Block is used. This allows you to track which Content Block generates the most interaction.
Technical note:
In a Content Block, it is possible to reference links using the name of the Link instead of the ID.
For example, for the following tracked link in the Content Block <a href="http://www.google.be" data-link="my_url">ClickMe</a>
you can use [%link('my_url')%] in any link expression used in the Content Block (ex. [%concat(link('my_url'), '&context=', urlencode([VARIABLE.URL]))%] )
Note that this only applies for expressions added to the Content Block itself, not to the message. You can use the name of links defined in the Content Block as well as the name of links defined in the message.
Because the tracked links are displayed multiple times, this can lead to confusion. Therefore, tracked links can be given an alias, so there is a clear distinction between them, which is especially useful in reporting. This alias is assigned when editing the properties of the Content Block link in the message.
In the Links section, click the pencil icon next to the link to display the Properties dialog and define an alias.
The alias and the name of the link are displayed in the Links overview:
Note: In case the link points to an existing journey, it is possible to pass parameters to the Input Component of that journey. This can be done directly in the query string:
<a href="sgmc://journey/123/456?c=subscribe&canal=email" data-link="SMC-journey">Click here</a>
It is also possible to pass expressions:
<a href="sgmc://journey/123/456?c=subscribe&canal=[%[PREFERENCES.PREFERRED_CHANNEL]%]" data-link="SMC-journey">Click here</a>
When no data-link attribute is added, the link is an ordinary hyperlink. It will not be displayed on the Links tab when used in a message and it cannot be edited once used in the message.
href attribute to indicate the target
In addition, when the href attribute is filled out, the link target is not editable when the Content Block is used in a message. On the other hand, when no href attribute is defined for the link in the Content Block, the user will be able to define the actual target in the properties of the link when used in a message. The target can be an external URL, a page in an existing journey or the target can be defined in the journey. (You can find more information on the use of Content Blocks in this topic. )
Example: The Content Block contains one pre-configured hyperlink where the HREF attribute is filled out and one without the HREF attribute. They will both be listed in the Links section of the message. The second hyperlink will be configurable.
![]()
If we add the same Content Block twice, a second section is added with the links in the second Content Block. Although the same Content Block is added to the message, the configurable links can be configured differently.
![]()
When the Content Block link points to a specific journey in Campaign or in Selligent, parameters can be passed on in the Content Block. The following syntax must be used and will only work when used in Content Blocks:
Example of links to journeys:
<a href="sgmc://journey/123/456" data-link="SMC-journey">Link to Selligent by Zeta journey</a>
<a href="sgmc://campaign/123/456" data-link="Campaign-journey">Link to Campaignjourney</a>
Example of links with parameters:
<a href="sgmc://campaign/123/456?USERNAME=Andrew" data-link="Campaign-journey-param">Link to Campaignjourney</a>
In all examples above, the indicator 123 refers to the Journey ID and the indicator 456 to the Component ID.
When you want to add the web version link to the Content Block, the following syntax is used.
<a href="[%LINK(0)%]" style="text-decoration:none;color:#0000aa;">web version</a>
or
<a expr:href="LINK(0)" style="text-decoration:none;color:#0000aa;">web version</a>
where LINK(0) always refers to the default web version link created in every message. This link is non-editable.
Unsubscribe and Analytics attributes for reporting
If the link in the Content Block is used as an unsubscribe link, you can add an attribute to the link so that this link will not be included in reporting. The syntax is as following:
Example:
<a href="sgmc://journey/123/456" data-link="Unsubscribe" unsubscribe-link="true">link to Unsubscribe journey</a>
Technical note: If a link is flagged as an unsubscribe link, this results in the following behavior:
The Unsubscribe link is separated from the other links in reporting to ensure a dedicated metric that provides information on the number of customers who have clicked it.
Unsubscribe links are also available as a separate event in the Segment Builder. This lets you create segments that take account of the actions on an Unsubscribe link.
Clicks on Unsubscribe links will not be taken into account when calculating the winner of an AB test on a message.
On the other hand, tagging a link in the Content Block will allow it to be included when trackers are activated on your environment. The syntax is as following:
Example:
<a href="https://acc3.emsecure.local/shop/default.aspx?CATIDL2=47" data-link="Home_Cat_NL_BE" analytics-link="Home Electronics"> Electronica </a>
Note: It is possible to use expressions in the analytics-link attribute.
More information on the use of Content Blocks with links can be found in this topic.
Interest Tags attributes for interest tracking
When creating a Content Block with links, you can now tag these links with Interest Tags as well. This is done in the following manner:
The attribute interest-tags-link is added to the link tag. The tags are separated by a comma.
Technical note: Note that the Interest tags used in the Content Block should correspond to the tags in the Tag List linked to the Audience List for which the content is being created.
When this Content Block is used in a message, the links used in the Content Block are listed and when opening a link, the different Interest tags set for the link are shown: