Summary / TL:DR: This article will show you how to use the Link Algorithm shared asset for link tracking.
2 3 min read
In your production and sandbox instances you will find a shared asset labeled "Link Alogrithm." This shared asset stores all of the logic for promotion, order, and unsubscribe links to work.
Info |
---|
Note: Every email template that has either a promotion, order, or unsubscribe link must include the following shared asset. Please check with you team to see if you are using the default shared asset defined by WesTech or a customized version on your templates. |
Include at the top of every template | ||
|
Now, lets take a look at the components of this shared asset and the purpose for each section.
The Algorithm
The link algorithm section is a snippet of code that is required to generate the appropriate link tracking parameters needed for IRIS, Opium, FunnelCake, and Unsubscribe links. It's important to not modify this code as it will adversely affect your reporting, sales, and deliverability reputation.
Code Block |
---|
{% assign campaignId = {{campaign_uuid}} %} {% assign experimentId = {{experiment_uuid}} %} {% comment %} Order Link {% endcomment %} {% assign contactId = {{user_transaction.group_id}} %} {% assign shsec = "5018bbccde7b4d3ecf0b800b39e7200f" %} {% assign order_vid_string = campaignId | append: "|" | append: contactId | append: "|" | append: shsec %} {% assign order_vid = {{order_vid_string | md5_vid}} %} {% comment %} Unsub Link {% endcomment %} {% assign emailId = {{user_transaction.email_id}} %} {% assign listCode = {{user_transaction.list_code}} %} {% assign st = "SUA" %} {% assign unsub_vid_string = st | append: emailId | append: listCode %} {% assign vid_up = {{unsub_vid_string | sha256}} %} {% assign unsub_vid = {{vid_up | downcase}} %} {% assign eid = {{user_transaction.email_id | b64_enc}} %} {% assign lstcd = {{user_transaction.list_code | b64_enc}} %} |
Promotion and Order Link Parameters (IRIS, IRIS+, Opium, & FunnelCake)
The promo_query_vars variable captures the needed link parameters to allow promotion and order links to work properly.
To view an example visit the /wiki/spaces/BSSUPPORT/pages/13633204227 wiki page
Code Block |
---|
{% capture promo_query_vars %}?customerNumber={{contactId}}&campaignId={{campaignId}}&r=eml&experimentId={{experimentId}}&vid={{order_vid}}{% endcapture %} |
Unsubscribe Link Parameters (SignupApp 2)
The unsub_query_vars variable captures the needed link parameters to allow unsubscribe links to work properly.
Code Block |
---|
{% capture unsub_query_vars %}/emailId/{{eid}}/listCode/{{lstcd}}/vid/{{unsub_vid}}/campaignId/{{campaignId}}/experimentId/{{experimentId}}/{% endcapture %} |
Defining your Unsubscribe Links
Defining your Unsubscribe links requires three functions.
First, we use CASE to look up the list_code data synced from Advantage.
Second, we use WHEN to define our Advantage list code.
Finally we use CAPTURE to define our Unsubscribe Link inside the unsub_link variable.
To view an example visit the Unsubscribe Links wiki page
Code Block |
---|
{% case user_transaction.list_code %} {% when "ABC" %} {% capture unsub_link %}https://signupapp2.abc.com/signupapp/unsubs{{unsub_query_vars}}{% endcapture %} {% when "LMN" or "XYZ" %} {% capture unsub_link %}https://signupapp2.lmnxyz.com/signupapp/unsubs{{unsub_query_vars}}{% endcapture %} {% endcase %} |
Info |
---|
Note: To define additional unsubscribe links, simply copy and paste the two lines WHEN and CAUPTURE unsub_link. Modify the list code inside of the WHEN function, then, change out your unsubscribe link in the CAPTURE function. |
Tip |
---|
Wrap upYou should now know how to use the Link Algorithm shared asset for link tracking. |
Info |
---|
Still need help? We know this can be frustrating. To get further help please open a Support ticket. |
Related Content
Level up with a Masterclass
Evolve course title
Evolve course title
Note |
---|
Cannot find the article you’re looking for? Suggest a new article here! |