Ⓘ Available to Plus accounts and subaccounts of HQ, Essentials, Teams, and Corporate accounts
Code-Your-Own (CYO) campaigns allow you to design your entire email, from header to footer and everything in between, with your own HTML code. Designing HTML for email is different from designing HTML for a webpage or print mailing. While there are a number of key similarities, there are many more key differences, so please adhere to the following note.
Due to the nuances of HTML, it’s crucial that any person copying, adjusting, or writing HTML code is formidably experienced with HTML coding. We do not offer direct support for customer-created code.
How to add your own HTML code to a CYO campaign
- Navigate to your Campaigns tab.
- Click on the Create new campaign button.
- Enter a name for the new campaign and click on the Continue button.
- On the next page, click on the Start from scratch button in the upper right corner.
- In the pop-up window that appears, select Custom HTML.
To begin, have your HTML code ready to go and simply drop it in line 1 or 2 of the starter code, replacing the doctype
tags. This will place your content above the footer that is automatically included. You’ll also find some helpful preview options so you can see how your freshly coded campaign will render.
Code your own footer
By default, all CYO campaigns contain the HTML code for our standard footer. This is the only element included in CYO campaigns, as it is needed in order to remain CAN-SPAM compliant. You can choose to take advantage of the footer as-is, or you can customize it. If you do nothing to the CYO footer, it will look the same as the standard footer for legacy* campaigns.
Footer requirements
While the footer code is editable, you are still legally required to adhere to the CAN-SPAM Act regarding email marketing, in addition to our Permission & Privacy Policy. Specifically, there are two items that we require in your campaign in order for you to send:
- A physical postal address
- A clear opt-out link (which we provide through the [% unsub_url %] tag and the TrueRemove® service)
These items must be clearly visible and cannot be obscured using styling, i.e. white text on a white background. For more information about CAN-SPAM compliance, please refer to this guide from the FTC.
Always test your campaign before sending it
When working with HTML code, every character counts, so we highly recommend that you preview and test your campaign before you send it.
Common HTML tags
There are various elements that you can hardcode into a CYO template to aid in your design. Though you won’t necessarily need any actual knowledge of Javascript or JSON, they are called for using a syntax unfamiliar to (though evident in) the HTML and CSS typically used in templating markup. When building a CYO campaign, you’ll find a list of the most commonly used HTML tags conveniently placed on the left side of the screen, we’ve added to those below, giving you a more extensive list of helpful HTML tags.
When using tags, every space and character has importance and should be used exactly as seen below, even seemingly small changes like using single quotation marks instead of double quotation marks can cause issues, so be sure to use each tag precisely as written.
Footer tags
Tag | Function |
[% unsubscribe %] |
Automatically adds everything in a standard footer |
[% unsub_url %] |
Required link to opt-out |
[% manage_url %] |
Link to manage preferences |
[% signup_url %] |
Link to the signup form sent with that campaign |
[% webview_url %] |
Use to link image or text to the online version of that campaign |
[% webview %] |
Link to the online version of the campaign |
[% optin_confirm_url %] |
Link to confirm subscription |
[% account_rsvp_address_1 %] |
RSVP address line 1 |
[% account_rsvp_address_2 %] |
RSVP address line 2 |
[% account_rsvp_city %] |
RSVP city |
[% account_rsvp_state %] |
RSVP state |
[% account_rsvp_province %] |
RSVP province |
[% account_rsvp_zip_code %] |
RSVP zipcode |
[% account_rsvp_country %] |
RSVP country |
[% account_rsvp_name %] |
RSVP name |
[% account_rsvp_email %] |
RSVP email |
[% account_rsvp_address %] |
RSVP address |
[% account_rsvp_full_address %] |
RSVP full address |
Social sharing tags*
Tag | Function |
[% block type="social" %][%/ block %] |
Full social sharing block |
[% share:email url_only="true" %] |
Link to share campaign by email |
[% share:twitter url_only="true" %] |
Link to share campaign via Twitter |
[% share:facebook url_only="true" %] |
Link to share campaign via Facebook |
[% share:linkedin url_only="true" %] |
Link to share campaign via LinkedIn |
*Social sharing tags can only be used in CYO mailings or in the legacy* editor. They cannot be used in the new drag and drop editor. For more information about social sharing in the new editor, please refer to this article.
Personalization tags
For more information about using personalization in the legacy* editor, please refer to this article. For more information about using personalization in the new drag and drop editor, please refer to this article.
Tag | Function |
[% member:name_first default="" %] |
First name, if member field shortcut name is name_first |
[% member:first_name default="" %] |
First name, if member field shortcut name is first_name |
[% member:name_last default="" %] |
Last name, if member field shortcut name is name_last |
[% member:last_name default="" %] |
Last name |
[% member:email default="" %] |
Email address |
[% member:address default="" %] |
Address |
[% member:address2 default="" %] |
Address line 2 |
[% member:city default="" %] |
City |
[% member:state default="" %] |
State |
[% member:postal_code default="" %] |
Postal code |
[% member:phone default="" %] |
Phone |
[% member:member_id default="" %] |
Contact’s member ID number |
[% member:company_name default="" %] |
Company name |
[% date:weekday %] |
Weekday (Tuesday) |
[% date:weekday plus_days="2" %] |
Weekday plus 2 days (Thursday) |
[% date:weekdaySHORT %] |
Shortened weekday (Tue) |
[% date:day %] |
Specific date (01) |
[% date:month %] |
Month (March) |
[% date:monthSHORT %] |
Shortened month (Mar) |
[% date:year %] |
Year (2025) |
[% date:month plus_days="X" %] [% date:day plus_days="X" %], [% date:year plus_days="X" %] |
Create an expiration date for a coupon or another special offer based on X-number of days out from the date a contact signed up using the signup form tied to your automation. (March 06, 2022) |
Additional resources
- Ways to use HTML code in your campaigns
- HTML styling, backgrounds, and alignment
- Using HTML code for tables
- Mobile tips for building a CYO campaign
- How to use the HTML block
- Images: Specifications and tips
* In April 2022, our legacy editor was replaced with a new drag and drop editor. Accounts that existed prior to this change still have access to the legacy editor through their previously saved templates and campaigns, however new, from-scratch campaigns can only be created in the new drag and drop editor. Accounts that were created after this change only have access to the new drag and drop editor. Please refer to our new editor FAQ article for more information.