Treats a string as though it came in from a content area. To retrieve tracking information associated with these strings, include the httpgetwrap string in embedded links.
warning: Always sanitize user input within a TreatAsContent() block. Remove, escape, or disallow input that contains HTML tags or AMPscript code, or use an allowlist of safe characters.
Availability
<table> <tr> <td>Marketing Cloud Engagement</td> <td>✅ Yes</td> </tr> <tr> <td>Marketing Cloud Next</td> <td>❌ No</td> </tr> </table>Syntax
TreatAsContent(stringToReturn)
The TreatAsContent() function has one parameter:
stringToReturn(string): Required. The string to return as content.
Usage
This example returns a string of text. If the content contains personalization strings, the function replaces them with the appropriate data.
TreatAsContent(Field(@row,'Content'))
important: Use this function only with data that has been reviewed and optimized to appear as content.