Dynamic Code

Salesforce Marketing Cloud dynamic codes

The Marketing Cloud uses dynamic codes to create links or insert data automatically in an email message. Some are required and must be used in all messages. Review the list below, and add codes as needed to your email content. IU Marketing Cloud templates have this code already programmed in.

Email Code Required for sends? Description & Use

<custom name="opencounter" type="tracking">

Optional but recommended

Marketing Cloud html or template files must contain this tracking code inserted into the BODY tag, in order for analytics to capture "opens"


Optional but recommended

View Online link, so that recipient can view email version in a browser (in the event email client does not load, if images are blocked, or for audience preference). Recommend inserting into email header or email pre-header.
If you are using a template this would be inserted via the Delivery Profile header via Library Content, as a rule.



%%Member_City%%, %%Member_State%%, %%Member_PostalCode%%, %%Member_Country%%


Insert organizational and Physical Address fields using the data in the Business Unit's "Account Settings". Recommend inserting into footer. These fields are mandatory for a valid email in Marketing Cloud, and are required by CAN-SPAM.

If you are using a template this must be inserted via the Delivery Profile footer via Library Content.



Link to Marketing Cloud Profile Center, where recipients (other than IU employees or students) may update contact information and link to Subscription Center. Recommend inserting into email footer.


Required if email is not transactional

Link to Marketing Cloud Subscription Center, where email recipient may modify their subscriptions to any "public" lists. May add or remove from any public lists in the single business unit. Recommend inserting into email footer.


Recommended for newsletters. Required for commercial.

Unsubscribe link to allow user to have one-click unsubscribe option in an email. Recommend inserting into email footer.

This email was sent to:%%emailaddr%%

Optional but recommended

CAN-SPAM statement. CAN-SPAM requires content noting who sent the email and a physical address (organizational information above for members). It is best practice to include a statement about who is receiving the email and why. Another common example at IU might be: "This email was sent to %%emailaddr%% as an employee of Indiana University." To learn more, visit  ftc.gov .



Use the recipient's email address in CAN-SPAM statement or elsewhere in content.

%%First Name%%


Use recipient's first name in Subject Line, salutation or elsewhere in content.

Note: Only use personalization if you are 100% confident in your data.



"Forward to a Friend" link.