hat
Boomtrain University
Partner Pages

Reference

Marketo

Dynamic Subject Line

To implement a dynamic subject line in Marketo, you can follow these steps. Be sure to contact Boomtrain Support if you run into any trouble!

Note that in order to implement dynamic subject lines, you will create a Marketo token for the subject line script. Once this is done, all of your dynamic images must be converted to tokens as well.  We will start with the dynamic subject line token.

Part 1 – Create your Dynamic Subject Line token

  1. Update this script with your account ID, model type, notification ID, and default subject line##set all your URL variables
    #set($email = $esc.url(${lead.Email})) ##set the email address

    #set($appId = “APPLICATIONID“) ##set the application id here
    #set($model = “MODEL“) ##set the model type here
    #set($position = 1) ##set the position here

    #set($notification = “NOTIFICATIONID“) ##set the notification id here
    #set($timestamp = $esc.url($date.get(“yyyy-MM-dd hh”))) ##sets the current timestamp


    ##get the result

    #set($subjectLine = $import.read(“https://api.boomtrain.com/dynsubject/${appId}/${email}/${model}/${position}/${notification}?bt_ts=${timestamp}”))

    ##print the returned SL or the default SL
    $display.alt($subjectLine , “DEFAULT_SUBJECT_LINE“)

  2. Next, create a new campaign in Marketo:
    Screen Shot 2016-02-05 at 2.35.18 PM
  3. Go to “My Tokens” and create a new “Email Script” token by dragging one onto the canvas.
    Screen Shot 2016-02-05 at 2.36.46 PM
  4. Give your token a name, and click the “click to edit” button.  Expand the “Lead” object, find the “Email Address” object and check the box, then copy and paste your script into the editor window. Save to close the window and save again to submit the change.
    Screen Shot 2016-02-05 at 2.38.01 PM
  5. Next, create a new email, and use the “ { { “ button to insert your token in the subject line
    Screen Shot 2016-02-05 at 2.39.54 PM
    Screen Shot 2016-02-05 at 2.41.46 PM
    Screen Shot 2016-02-05 at 2.43.04 PM

 

Now you can test your implementation by clicking the “Preview Draft” button, and selecting a list of customers on the preview page.

Part 2 – Convert your dynamic images to tokens

  1. As you did above, update the below script with your App ID, model type, position, and notification ID.  Note that POSITION does not need to be in quotes.
    ##set all your URL variables
    #set($email = $esc.url(${lead.Email})) ##set the email address

    #set($appId = “APPLICATIONID“) ##set the application id here
    #set($model = “MODEL“) ##set the model type here
    #set($position = POSITION) ##set the position here

    #set($notification = “NOTIFICATIONID“) ##set the notification id here
    #set($timestamp = $esc.url($date.get(“yyyy-MM-dd hh”))) ##sets the current timestamp
    ##set URLS
    #set($link = “api.boomtrain.com/dynlink/${appid}/${email}/${model}/${position}/${notification}?bt_ts=${timestamp}” #set the link
    #set($link = “api.boomtrain.com/dynimg/${appid}/${email}/${model}/${position}/${notification}.png?bt_ts=${timestamp}” #set the image##print the BT recommendation area

    <a href=”https://${link}” target=”_blank”><img src=”http://${img}” /></a>

  2. Now go back to “My Tokens” as above in step 3, and create a new token for each dynamic image in your template.  Be sure to check the Lead “Email Address” box and save, as in step 4.
  3. You can now go back to your email template and insert your dynamic image tokens into the body of your email and test.  The dynamic subject line should match up with your first recommendation block!

Screen Shot 2016-03-25 at 2.15.02 PM

 

Shares
Share This