You are here:
Create a Code Snippet
Use code snippets in Marketing Cloud Engagement Content Builder to save reusable bits of HTML, AMPscript, and Guide Template Language. Insert snippets when editing HTML via the Code Snippets toolbar selector, or by typing the Customer Key value for the snippet followed by the Tab key. You can also create a code snippet content block by clicking Create > Content Blocks > Code Snippet. You can reference Code Snippets with the AMPscript ContentBlockByKey and ContentBlockByID functions.
Follow this task to create a code snippet in the editor.
- In the Content Builder editor, highlight the HTML you want to use as a code snippet.
-
Click
from the
toolbar menu and select Create New Snippet.
- Alternatively, highlight your HTML, then right-click and select Create Code Snippet.
- Complete the fields and click Save. To edit a saved code snippet, select the code snippet from the content library and click Edit.
- Google Promotions Tab
Learn how to use a Google Promotions Tab code in Marketing Cloud Engagement Content Builder to enhance your email promotions with images, deals, expiration dates, and more.

