Link templates
A link template adds query parameters to links in an edition, such as utm_source=newsletter. A publication picks one
in its settings, and a variant may pick its own, which tags that variant’s links in place of the publication’s. It
applies only to links to the publication’s own site, and never replaces a parameter a link already has.
You need the permission to configure publications. A change takes effect on deploy, and the console marks the link template Draft until then.
Create a link template
Section titled “Create a link template”- Open Messaging › Configuration › Link templates and select Add template.
- Fill in the form:
- Name: unique, up to 200 characters.
- Messaging provider: only when a value uses Braze tags. Leave it empty for EdgeKit tokens alone.
- Parameters: up to 20. Each has a name of up to 100 letters, digits,
.,_,~or-, and a value of 1 to 500 characters.
- Select Save template.
A value is plain text, EdgeKit tokens and, with Braze picked, Braze tags. Anything else in braces is refused. Liquid is never allowed.
| EdgeKit token | Becomes |
|---|---|
{publication} |
The publication’s slug. |
{edition_date} |
The send date, YYYY-MM-DD, in the schedule’s time zone, else your organization’s. |
{variant} |
The variant’s name. |
{slot} |
The slot’s number, from 1. A parameter using it is left off links outside every slot. |
{edition_id} |
The edition’s id. |
{user_id} |
The recipient’s user id. |
{email_sha256} |
The SHA-256 hash of the recipient’s email address, lower-cased and trimmed, in hex. |
{list_id} |
The id of the list the edition is sent to. |
{user_sig} |
The recipient’s signature. Only in a newsletter link, below. |
{user_id}, {email_sha256}, {list_id} and {user_sig} are filled for each recipient on every messaging
provider, so a template using them needs no provider picked.
| Braze tag | Becomes, for each recipient |
|---|---|
${user_id} |
The Braze external_id. |
${braze_id} |
The Braze profile id. |
${email_address} |
The email address. |
campaign.${api_id} |
The campaign’s id. |
campaign.${dispatch_id} |
The send’s dispatch id. |
campaign.${name} |
The campaign’s name. |
For example, utm_campaign = {publication}-{edition_date} and utm_content = {variant}-slot-{slot}.
Newsletter links
Section titled “Newsletter links”A newsletter link tells EdgeKit which user an edition’s link was sent to, so a click from the email is not decided as an unknown device. Add one parameter, with this name and this value and nothing else:
| Parameter | Value |
|---|---|
ek_nl |
{user_id}.{list_id}.{user_sig} |
A save refuses ek_nl with any other value, and {user_sig} in any other parameter.
On a page that opens with the parameter, the read counts on that user’s meters, an experiment whose unit is the
user gives the arm the edition showed, and the newsletter_link.* facts are filled for your rules to read. See
Newsletter links. The browser client removes the parameter from the
address bar, and analytics never stores it.
Know what it is before you turn it on:
- It says who the link was sent to, not who is clicking. A forwarded email carries the same link, so whoever opens it is counted and targeted as that user. It never signs anyone in and never opens content a grant protects, unless you write a rule that does.
- It does not expire.
- It works only when your messaging provider’s user id is the EdgeKit user id. On Braze that is the profile’s
external_id.
Which links get the parameters
Section titled “Which links get the parameters”- Links to the publication’s site, matched on the site’s domain. A leading
www.is ignored. Any other subdomain is another site, and its links are left alone. - A parameter the link already has is left as it is.
- In the public archive, a parameter whose value holds a Braze tag,
{user_id},{email_sha256},{list_id}or{user_sig}is left off, because there is no recipient.
A template with Braze tags can only be used by publications that email through Braze, and by their variants, and a change that would break that for one using it is refused. Link templates are never deleted, because a publication or a variant may name one.