...
Summary / TL:DR: This article will show you how to use the Link Algorithm shared asset for link tracking.
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
...
Code Block |
---|
<shared_asset> bsft_Link_Algorithm </shared_asset> |
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 Promotion and Order Links 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 %} |
go over unsubscribe links in Blueshifts.
...
New Unsubscribe Link
In the refactored instance of Blueshift a new unsubscribe link was created to support the vid2 link parameter:
https://signupapp2.YOURDOMAIN.com/signupapp/unsubs/v2?
Once the link is clicking on it should look something like the following:
https://signupapp2.YOURDOMAIN.com/signupapp/unsubs/v2?vid2=007434f6116c1b262cacae4def1de9707cd16a57217e3eaec65f6d7903976d36&bsft_clkid=cf45cd3a-c34f-4f00-9dbb-e5419e6b4c2f&bsft_uid=09127a6e-0c13-4238-a94f-be92b5ab08fc&bsft_mid=222108b4-db68-4b7b-b5e1-8a1e939a1757&bsft_eid=175c8b10-1af2-4b63-b3a7-b8f6056e268f&bsft_utid=09127a6e-0c13-4238-a94f-be92b5ab08fc-e460f020dc7c9738cfd104c681d57894&bsft_mime_type=html&bsft_ek=2022-02-09T14%3A45%3A24Z&bsft_aaid=e7db2710-78ab-4f64-94d2-0f2b270fcc83&bsft_lx=3&bsft_tv=38
The vid2 parameters is decrypted by SUA2 to know which list code to unsubscribe the email address from. All that’s needed is for the link to be places in the content. No additional parameters are required to be added to the end of the link for the unsubscribe to work.
...
Tip |
---|
Wrap upYou should now know how to use the Link Algorithm shared asset for link trackingunsubscribe links in your refactored instance of Blueshift. |
Info |
---|
Still need help? We know this can be frustrating. To get further help please open a Support ticket. |
...