Email

Once you have created or pasted the source html, you can personalize the content including subject line. To preview all variables available for personalization, navigate to the Recommendation tab. Make sure you have selected a valid user (email) and recommendation algorithm for product related content.

 

e2ea112-Email_Variables.png

 

  1. User Attributes
  2. Catalog Attributes
  3. Event Attributes
  4. Global Variables
  5. Editable Blocks
  6. Email Test Send
 

1. User Attributes

Select a user in the Recommendations tab and simply start typing in the liquid variable syntax, {{user}}, in the source editor. You should see a list of variables (standard and extended/custom) available for the user.

Variables

Variables can be categorized as standard or extended (non-standard). To reference extended variables, simply add extended_variables syntax in your liquid expression.

47ce83b-Email_UserAttributes.gif

 

For example, an if statement could be used to greet a user by the user.firstname attribute, if it's available, but fallback to calling them "Friend" if the user.firstname attribute is not available.

  • FirstName Example
Hi {% if user.firstname == blank %}Friend{% else %}{{user.firstname | capitalize}}{% endif %}
 

2. Catalog Attributes

Blueshift makes it easy to reference catalog/content properties in your triggered and recurring campaigns. There are few steps to get started.

  1. Reference products from Recommendation algorithm in the template

The catalog content can either be referenced via Products or a Recommendation Block array. See the following example of how you would reference products using both options in an email template.

8b0534e-CatalogPersonalization.png

 

Similar to user attributes, make sure to pick a user and an algorithm in the Recommendation tab prior to inserting product/recommendation variables. The recommendation output might have one or more blocks and depending upon the logic some of the blocks could be empty. By default the campaign execution will skip users if one of the blocks is empty, but depending upon how the template is coded, you may want to check or uncheck the flag.

4bfcd36-UserPersonalization.png

 

Simply start typing in the liquid variable syntax in the source editor and you should see a list of variables available for the user. For catalog content, you can type {{products}} or {{recommendation}}

784786f-Email_ProductAttributes.gif

 

 

3. Event Attributes

You can also personalize your templates by inserting Event variables directly in the template. There are a few personalization options:

1) User attributes - See above to insert user variables. For example, {{user.firstname}}, {{user.extended_attributes_city}}
2) Product Data - In order to do this, the event must contain product_id or product_ids. The variable to use is {{event_product_details.xyz}}
3) Event Properties - Simply use the {{attribute_name}} syntax to reference your event variables. For example, for the sample event below you would use {{email}}, {{sku}}, {{first_name}}, etc. in your template.

  • Text
{
  "_browser_platform": "Linux",
  "_browser_type": "Chrome",
  "_browser_version": "37.0.2062.117",
  "cookie": "06a99b5f-er4da-8cec-e98d-c0b707757c11",
  "customer_id": "558490",
  "email": "test@getblueshift.com",
  "event": "purchase",
  "ip": "76.134.242.134",
  "referrer": "http://getblueshift.com/offer/free/trial/?utm_expid=53001714-49.ysWxKEoVQ1OjRrTOJxWsxA.1&afid=fbpfree&utm_source=facebook&utm_medium=lpm&utm_campaign=fbpfree&utm_term=fbads&utm_content=ftpineapplebox",
  "revenue": "0",
  "session_uuid": "4bdbd6874-9f36-404b-a174-8a545d7fa4e0",
  "sku": "t-shirt",
  "url": "https://getblueshift.com/checkout?sku=t-shirt&afid=fbpfree",
  "user_agent": "Ruby",
  "order_id": "mjo654961905",
  "timestamp": "2017-02-09T14:55:41Z",
  "site": "demosite.com",
  "product_ids": [
    "1234"
  ],
  "event_uuid": "53ed44ee-eef9-11e6-890c-0242ac110008",
  "timestamp_epoch": 1486652141,
  "account_uuid": "03b11234d7-7d3a-434a-96a0-cb790c8dd91e"
}

To preview these personalization variables in the template, you will need to paste a sample event payload in the Context section of the template editor.

165b670-EventVariables.png

 

Event preview

User attributes (name, email, etc.) will change every time you input a new email address, but product and event attributes will always reflect what is in the Content area. Simply paste another event to view its values in the template.

 

4. Global Variables

Preview Email: You can use the variable {{email_preview_link}} to create an online version of your email template.  

<a href="{{email_preview_link}}">Click here to preview</a>

Unsubscribe: Use the variable {{unsubscribe_link}} in your HTML templates. When the email is sent out, the variable link expands to a hyperlink that includes a hash of the user's ID. When the user clicks on it, we track the click and unsubscribe the user.

Resubscribe: You may want to send a confirmation email when a user unsubscribes from your mailing list. However, you could also include an option to resubscribe by inserting the variable {{resubscribe_link}} in your HTML templates.

Open Tracking Pixel:

An open tracking pixel is added to the end of each email body by default. However, accounts can opt-in to position this pixel manually. If manual positioning is enabled, the pixel is inserted into the email markup by adding the following snippet. 

<img src="{{bsft_open_pixel}}"/>

If this snippet is missing from your template, then the open tracking pixel will be added to the end of the email body automatically.
 
Skipping Link Tracking:
We have a specific attribute for this purpose.  A "bsft-no-track" attribute that you can add to relevant links. It will remove all blueshift tracking from the specified link and you use it like this:
<a href="https://www.gmail.combsft-no-track>email link</a>
 

5. Editable image & text blocks

You can make certain image elements & text blocks editable, without the need to change the HTML. Once you register these elements, you will see them under the “Elements” tab of the template:

QgnuqwEgQLyaYh43EwJe_elements_tab.png

Editable Image Elements: You can make up to 30 images in the template editable by adding IDs "ad_hero1" through "ad_hero30". Here's a sample:

<img id="ad_hero1" src="http://d3ad91huxqg64v.cloudfront.net/e/fd769820f734872f7e2935bef2d66611-image_600x490.jpg"/>

Editable Rich Text Area Elements: You can make up to 30 rich text areas in the template editable by adding IDs "ad_body1" through "ad_body30" to the div surrounding the text block. Rich text elements show a WSYWYG editor to the end user and replace the contents of the marked div with html generated from by the WSYWYG.

<div id="ad_body1"><p>Lorem ipsum dolor sit amet magna aliqua aliquip ex ea commodo consequat.</p></div> 

Editable Plain Text Elements: You can make up to 30 plain text elements in the template editable by adding IDs "ad_text1" through "ad_text30" to the div surrounding the text block. Plain text areas replace the contents of the marked div with plain text, no html. This sample snippet adds two seperate plain text elements.

<p id="ad_text1">Hello World</p> 

<p id="ad_text2">Goodbye</p> 

 

6. Email Test Send

To preview your personalized content, you can send a Test Email to multiple users from within the Template Editor. Statistics on test send (open, click, etc.) will not be tracked.

558f302-Email_Test_Send.png

 

Interested in learning more? Sign up for our Blueshift Fundamentals course.
This course is designed to teach fundamental concepts of Blueshift followed by hands on exercises in a simulated Blueshift instance. 
Was this article helpful?
0 out of 0 found this helpful