When you’re creating a dynamic email in Salesforce Marketing Cloud using AMPScript, things can get muddled up with non-HTML code real fast — so muddled it’s hard to recognize the basic layout of the email. Sometimes it’s helpful to hide the AMPScript in a way that doesn’t affect the functionality. Here’s a trick that I use on a regular basis.
Hide your init block in with a styled DIV
I normally use these at the top of an email for initialization of variables, etc. Simply edit the content area to view the full code.
DO NOT use HTML comments to hide AMPScript. It will screw up the automatic text version of your email!