Snippets

Vlad Silak MC Guided Implementation - Assets

Created by Vlad Silak
<!--%%[
  if (_MessageContext == "PREVIEW") then
    ]%% -->
<div min-height="150px" style="background-color: #f0f0f0;">
  <center><span style="color: #3f3f3f; font-size: 16px; line-height: 50px;">This is initialization block for variables. Click to edit {AMPScript}.</span></center>
</div>
<!-- %%[
  endif

  if (_MessageContext == "SEND") then
    /* ********************************* *
     * ADD AND EDIT YOUR AMPSCRIPT BELOW *
     * ********************************* */

    set @AudienceName = [_DataSourceName]
    set @LocalSendTime = SystemDateToLocalDate(GetSendTime())
    
  endif
]%% -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">
      ReadMsgBody{ width: 100%;}
      .ExternalClass {width: 100%;}
      .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}
      body {-webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;margin:0 !important;}
      p { margin: 1em 0;}
      table td { border-collapse: collapse;}
      img {outline:0;}
      a img {border:none;}
      p {margin: 1em 0;}
      @-ms-viewport{ width: device-width;}
    </style>
    <style type="text/css">
      @media only screen and (max-width: 480px) {
        .container {width: 100% !important;}
        .footer { width:auto !important; margin-left:0; }
        .content-padding{ padding:4px !important; }
        .mobile-hidden { display:none !important; }
        .logo { display:block !important; padding:0 !important; }
        img { max-width:100% !important; height:auto !important; max-height:auto !important;}
        .header img{max-width:100% !important;height:auto !important; max-height:auto !important;}
        .photo img { width:100% !important; max-width:100% !important; height:auto !important;}
        .drop { display:block !important; width: 100% !important; float:left; clear:both;}
        .footerlogo { display:block !important; width: 100% !important; padding-top:15px; float:left; clear:both;}
        .nav4, .nav5, .nav6 { display: none !important; }
        .tableBlock {width:100% !important;}
        .responsive-td {width:100% !important; display:block !important; padding:0 !important; }
        .fluid, .fluid-centered {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }
        .fluid-centered {
          margin-left: auto !important;
          margin-right: auto !important;
        }
        /* MOBILE GLOBAL STYLES - DO NOT CHANGE */
        body { padding: 0px !important; font-size: 16px !important; line-height: 150% !important;}
        h1 { font-size: 22px !important; line-height: normal !important;}
        h2 { font-size: 20px !important; line-height: normal !important;}
        h3 { font-size: 18px !important; line-height: normal !important;}
        .buttonstyles {
          font-family:arial,helvetica,sans-serif !important;
          font-size: 16px !important;
          color: #FFFFFF !important;
          padding: 10px !important;
        }
        /* END OF MOBILE GLOBAL STYLES - DO NOT CHANGE */
      }
      @media only screen and (max-width: 640px) {
        .container { width:100% !important; }
        .mobile-hidden { display:none !important; }
        .logo { display:block !important; padding:0 !important; }
        .photo img { width:100% !important; height:auto !important;}
        .nav5, .nav6 { display: none !important;}
        .fluid, .fluid-centered {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }
        .fluid-centered {
          margin-left: auto !important;
          margin-right: auto !important;
        }
      }
    </style>
    <!--[if mso]>
      <style type="text/css">
          /* Begin Outlook Font Fix */
          body, table, td {
              font-family: Arial, Helvetica, sans-serif ;
              font-size:16px;
              color:#808080;
              line-height:1;
          }
          /* End Outlook Font Fix */
      </style>
    <![endif]-->
  </head>
  <body bgcolor="#efefef" text="#808080" style="background-color: #efefef; color: #808080; margin: 0px; padding: 20px; -webkit-text-size-adjust:none; line-height: normal; font-size: 16px; font-family:arial,helvetica,sans-serif;">
    <div style="font-size:0; line-height:0;"><custom name="opencounter" type="tracking"><custom name="usermatch" type="tracking" /></div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
      <tr>
        <td align="center" valign="top">
          <custom type="header" />
        </td>
      </tr>
      <tr>
        <td align="center">
          <table cellspacing="0" cellpadding="0" border="0" width="600" class="container" align="center">
            <tr>
              <td>
                <table class="tb_properties border_style" cellspacing="0" cellpadding="0" bgcolor="#ffffff" width="100%">
                  <tr>
                    <td align="center" valign="top">
                      <table align="left" border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                          <td class="content_padding" style="padding:10px;border:0px;">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                              <tr>
                                <td align="left" class="" valign="top">
                                  <table class="slot-styling" style="min-width: 100%;" width="100%" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td class="slot-styling camarker-inner" style="padding-bottom: 5px;" width="100%"><div data-type="slot" data-key="ampscript" data-label="AMPscript Initialization Block (Optional)"></div></td>
                                    </tr>
                                  </table>
                                </td>
                              </tr>
                              <tr>
                                <td align="left" class="" valign="top">
                                  <table class="slot-styling" style="min-width: 100%;" width="100%" cellspacing="0" cellpadding="0"><tr><td class="slot-styling camarker-inner" style="padding-bottom: 5px;" width="100%"><table style="min-width: 100%;" class="stylingblock-content-wrapper" width="100%" cellspacing="0" cellpadding="0"><tr><td style="padding: 10px;" class="stylingblock-content-wrapper camarker-inner"><table style="width: 100%;" cellspacing="0" cellpadding="0"><tr><td><table style="width: 100%;" cellspacing="0" cellpadding="0"><tr><td style="width: 30%; padding-right: 3px;" class="responsive-td" valign="top"><table style="min-width: 100%;" class="stylingblock-content-wrapper" width="100%" cellspacing="0" cellpadding="0"><tr><td class="stylingblock-content-wrapper camarker-inner"><table width="100%" cellspacing="0" cellpadding="0"><tr><td align="left"><img data-assetid="177387" src="http://image.s4.exct.net/lib/fe871574736c0d7b73/m/1/e17abac7-a5a9-4a63-98e7-f433e39cea63.png" alt="Rent-A-Vehicle Group logo" style="display: block; padding: 0px; text-align: left; width: 100px; border: 0px none transparent;" width="100"></td></tr></table></td></tr></table></td><td style="width: 70%; padding-left: 3px;" class="responsive-td" valign="top"></td></tr></table></td></tr></table></td></tr></table></td></tr></table>
                                </td>
                              </tr>
                              <tr>
                                <td align="left" class="" valign="top">
                                  <table class="slot-styling" style="border-bottom: 1px solid #AEAEAE; border-top: 1px solid #AEAEAE; min-width: 100%;" width="100%" cellspacing="0" cellpadding="0"><tr><td class="slot-styling camarker-inner" style="padding-top: 10px; padding-bottom: 10px;" width="100%"><div data-type="slot" data-key="maincontent" data-label="Main Content - use Layouts to structure your content here"></div></td></tr></table>
                                </td>
                              </tr>
                              <tr>
                                <td align="left" class="" valign="top">
                                  <table class="slot-styling" style="min-width: 100%;" width="100%" cellspacing="0" cellpadding="0"><tr><td class="slot-styling camarker-inner" style="padding-top: 20px;" width="100%"><table style="width: 100%; text-align: center; min-width: 100%;" class="stylingblock-content-wrapper" width="100%" cellspacing="0" cellpadding="0"><tr><td class="stylingblock-content-wrapper camarker-inner" align="center"><div style="text-align: center;"><a alias="Preference Center Link" conversion="false" href="%%profile_center_url%%" style="color:#808080;text-decoration:none; font-size: 14px;" title="Customize your subscription preferences">Personalize Your Inbox 📧</a>&nbsp;&nbsp;| &nbsp;&nbsp;<a alias="VAWP link" conversion="false" href="%%view_email_url%%" style="color:#808080;text-decoration:none; font-size: 14px;" title="Trouble reading this message? View it in a browser">Open in a browser</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a alias="One click unsubscribe link" conversion="false" href="%%unsub_center_url%%" style="color:#808080;text-decoration:none; font-size: 14px;" title="Unsubscribe from future communications">Break Up with Us 📨</a></div></td></tr></table>
                                  <table style="width: 100%; min-width: 100%;" class="stylingblock-content-wrapper" width="100%" cellspacing="0" cellpadding="0"><tr><td style="padding-top: 10px; padding-right: 10px; padding-left: 10px;" class="stylingblock-content-wrapper camarker-inner"><div style="text-align: center;"><span style="font-size:12px;">If you feel like chatting in person or sending a postcard find %%Member_Busname%% at %%Member_Addr%%, %%Member_City%%, %%Member_State%%, %%Member_PostalCode%%, %%Member_Country%%</span><br></div></td></tr></table></td></tr></table>
                                  <table style="width: 100%; min-width: 100%;" class="stylingblock-content-wrapper" width="100%" cellspacing="0" cellpadding="0"><tr><td style="padding-top: 10px; padding-right: 10px; padding-left: 10px;" class="stylingblock-content-wrapper camarker-inner"><div style="text-align: center;"><span style="font-size:12px;">Designed and developed in 🇦🇺 by </span><img data-assetid="177387" src="http://image.s4.exct.net/lib/fe8b157471610d7b72/m/1/19795884-d507-47f8-909b-1a88120ba5b8.png" alt="Viral Snail Marketing logo" style="padding: 0px; height: 20px; border: 0px none transparent;" height="20"><span style="font-size:12px;"> Viral Snail Marketing | &copy; 2018</span></div></td></tr></table></td></tr></table>
                                </td>
                              </tr>
                            </table>
                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td valign="top">
          <custom type="footer" />
        </td>
      </tr>
    </table>
  </body>
</html>
<!--%%[
  if (_MessageContext == "PREVIEW") then
    ]%% -->
<div min-height="150px" style="background-color: #f0f0f0;">
  <center><span style="color: #3f3f3f; font-size: 16px; line-height: 50px;">This is initialization block for variables. Click to edit {AMPScript}.</span></center>
</div>
<!-- %%[
  endif

  if (_MessageContext == "SEND" OR _MessageContext == "PREVIEW") then
    /* ********************************* *
     * ADD AND EDIT YOUR AMPSCRIPT BELOW *
     * ********************************* */

    set @AudienceName = [_DataSourceName]
    set @LocalSendTime = SystemDateToLocalDate(GetSendTime())
    
  endif
  
  /* set the @couponCode with RAVFRIENDS-MMMYY format */
  
  set @couponCode = CONCAT("RAVFRIENDS-", Uppercase(FORMATDATE(@LocalSendTime, "MMMyy")))
  
]%% -->
1
2
3
4
5
6
Dear %%First Name%%,<br>
<br>
Thank you for updating your profile and sharing more about you with us.<br>
<br>
We are pleased to learn that you have an interest in %%=ProperCase([Outdoor Interest])=%%.<br>
&nbsp;
Our team in partnership with NTO are pleased to share the following offer with you:<table cellpadding="0" cellspacing="0" class="stylingblock-content-wrapper" style="min-width: 100%;" width="100%">
 
  <tr>
   <td class="stylingblock-content-wrapper camarker-inner" style="padding: 10px;">
    <table cellpadding="0" cellspacing="0" style="width: 100%;">
     
      <tr>
       <td>
        <table cellpadding="0" cellspacing="0" style="width: 100%;">
         
          <tr>
           <td class="responsive-td" style="width: 15%; padding-right: 6.66667px;" valign="top">
           </td><td class="responsive-td" style="width: 70%; padding-left: 3.33333px; padding-right: 3.33333px;" valign="top">
            <table cellpadding="0" cellspacing="0" class="stylingblock-content-wrapper" style="background-color: #89E189; margin: 0px; border: 2px solid #1B2D1B; min-width: 100%;" width="100%">
             
              <tr>
               <td class="stylingblock-content-wrapper camarker-inner" style="padding: 5px;">
                <div style="text-align: center; color: #ffffff;">
                 <span>YOUR OFFER</span></div><h1 style="text-align: center; color: #ffffff;">
                 <span><span style="font-family:verdana,geneva,sans-serif; letter-spacing: 8px;">$20 OFF</span></span></h1><div style="text-align: center; color: #ffffff;">
                 YOUR NEXT PURCHASE OF $100 OR MORE AT NTORETAIL</div></td></tr></table></td><td class="responsive-td" style="width: 15%; padding-left: 6.66667px;" valign="top">
           </td></tr></table></td></tr></table></td></tr></table>&nbsp;<p style="font-family: Gotham, Helvetica, Arial, sans-serif; color: #4f4f4f; font-size: 16px; line-height: 22px;">
</p><div style="float: left; width:70%; height: 150px; font-family: Gotham, Helvetica, Arial, sans-serif; color: #4f4f4f; font-size: 16px; line-height: 22px;">
 Please use the following coupon code when making purchase online:<br>
 &nbsp;<center>
  <b><span style="font-family: &quot;Source Code Pro&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, Monospace; background-color: #f3f3f3; padding: 5px; margin: 0 -1px; border-radius: 3px; box-sizing: border-box; font-size: 16px;">%%=v(@couponCode)=%%</span></b></center><br>
 or print and present this barcode in store:</div><div style="float: left; width:30%;">
 <center>
  <img src="%%=BarCodeURL(@couponCode,'DataMatrix', 120, 120, 0, 0, '', 0, 1)=%%"></center></div><p>
</p>
<!-- %%[

  set @firstName = RequestParameter("fn")
  set @subKey = RequestParameter("sk")
  set @email = RequestParameter("e")
  
  set @formURL = CloudPagesURL({PROCESSING_PAGE_ID}, "fn", @firstName, "sk", @subKey, "e", @email)

]%% -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<header>
  <div class="navbar navbar-dark bg-dark shadow-sm mb-4" id="navbarHeader">
    <div class="container">
      <div class="row">
        <h4 class="text-white">Welcome %%=v(@firstName)=%%!</h4>
      </div>
    </div>
  </div>
</header>
<div class="jumbotron">
  <p class="lead">We would love to learn towards which of the below outdoor activities you have more preference:</p>
  <hr class="my-4">
  <form method="post" action="%%=v(@formURL)=%%" class="form-check">
    <div class="input-group mb-3">
      <input class="form-check-input" type="radio" id="category-running" name="category" value="running" checked="">
      <label class="form-check-label" for="category-running">Running</label>
    </div>
    <div class="input-group mb-3">
      <input class="form-check-input" type="radio" id="category-camping" name="category" value="camping">
      <label class="form-check-label" for="category-camping">Camping</label>
    </div>
    <div class="input-group mb-3">
      <input class="form-check-input" type="radio" id="category-hiking" name="category" value="hiking">
      <label class="form-check-label" for="category-hiking">Hiking</label>
    </div>
    <div class="input-group mb-3">
      <input class="form-check-input" type="radio" id="category-skiing" name="category" value="skiing">
      <label class="form-check-label" for="category-skiing">Skiing</label>
    </div>
    <div class="input-group mb-3">
      <input class="form-check-input" type="radio" id="category-climbing" name="category" value="climbing">
      <label class="form-check-label" for="category-climbing">Climbing</label>
    </div>
    <button type="submit" class="btn btn-primary btn-lg mb-2">Update Preference</button>
  </form>
</div>
<!--%%[
  set @interest = RequestParameter("category")
  set @firstName = RequestParameter("fn")
  set @email = RequestParameter("e")
  set @subKey = RequestParameter("sk")
  set @localSendTime = SYSTEMDATETOLOCALDATE(NOW())
  
  IF (EMPTY(@firstName) OR EMPTY(@email) OR EMPTY(@subKey) OR EMPTY(@interest)) THEN ]%%-->

<h2>Whoops, we have some problems over here captain!</h2>

<!--%%[ 
  ELSE 
    SET @ts = CreateObject("TriggeredSend")
    SET @tsDef = CreateObject("TriggeredSendDefinition")
    SetObjectProperty(@tsDef, "CustomerKey", "{EXTERNAL_KEY_OF_TRIGGERED_SEND}")
    SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)

    SET @subscriber = CreateObject("Subscriber")
    SetObjectProperty(@subscriber, "SubscriberKey", @subKey)
    SetObjectProperty(@subscriber, "EmailAddress", @email)

    SET @attribute = CreateObject("Attribute")
    SetObjectProperty(@attribute, "Name", "First Name")
    SetObjectProperty(@attribute, "Value", @firstName)
    AddObjectArrayItem(@subscriber, "Attributes", @attribute)
    
    SET @attribute = CreateObject("Attribute")
    SetObjectProperty(@attribute, "Name", "Outdoor Interest")
    SetObjectProperty(@attribute, "Value", @interest)
    AddObjectArrayItem(@subscriber, "Attributes", @attribute)
    
    SET @attribute = CreateObject("Attribute")
    SetObjectProperty(@attribute, "Name", "Local Send Time")
    SetObjectProperty(@attribute, "Value", @localSendTime)
    AddObjectArrayItem(@subscriber, "Attributes", @attribute)
    
    AddObjectArrayItem(@ts, "Subscribers", @subscriber)
    
    SET @ts_statusCode = InvokeCreate(@ts, @ts_statusMsg, @errorCode)

    IF @ts_statusCode != "OK" THEN
      RaiseError(@ts_statusMsg, 0, @ts_statusCode, @errorCode)
    ENDIF
]%%-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<header>
  <div class="navbar navbar-dark bg-dark shadow-sm mb-4" id="navbarHeader">
    <div class="container">
      <div class="row">
        <h4 class="text-white">Thank you for updating your preference %%=v(@firstName)=%%!</h4>
      </div>
    </div>
  </div>
</header>
<!-- %%[ ENDIF ]%% -->
<!--%%[
  if (_MessageContext == "PREVIEW") then
    ]%% -->
<div min-height="150px" style="background-color: #f0f0f0;">
  <center><span style="color: #3f3f3f; font-size: 16px; line-height: 50px;">This is initialization block for variables. Click to edit {AMPScript}.</span></center>
</div>
<!-- %%[
  endif

  if (_MessageContext == "SEND") then
    /* ********************************* *
     * DO NOT MODIFY THESE VARIABLES BELOW *
     * ********************************* */

    set @AudienceName = [_DataSourceName]
    set @LocalSendTime = SystemDateToLocalDate(GetSendTime())
    
    /* Anything else please add below */ 
    
    set @subKey = _subscriberkey
    set @email = emailaddr
    set @firstName = ProperCase([First Name])
    
    set @ctaURL = CloudPagesURL(NNN, "fn", @firstName, "sk", @subKey, "e", @email)
  endif
]%% -->
1
2
3
4
5
<h2 style="">
 Dear %%=ProperCase([First Name])=%%, thank you for your business!</h2><br>
Please take a moment to let us know about your outdoor interests. In turn we will be able to share some interesting offers with you from our partner NTO!<br>
<br>
&nbsp;

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.