Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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. 

...

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 requires three functions.

...

Info

Note: To define additional unsubscribe links, simply copy and paste the two lines WHEN and CAUPTURE unsub_linkModify the list code inside of the WHEN function, then, change out your unsubscribe link in the CAPTURE function.

...

Tip

Wrap up

You should now know how to use the Link Algorithm shared asset for link tracking.

...