Save sections of contents to reuse in your campaigns

Snippets can be used when you have pieces of content that you would like to reuse without having to recreate them each time (for instance, a menu structure in an email) or if you want to control the content from a central point so whenever you update the snippet content then that update will be reflected across all future campaigns that reference that snippet.


Snippets are a feature that was designed to be when you upload your own raw HTML for your campaigns. Although they can be inserted into email content built with the Email Builder, results may be inconsistent, and the Saved Rows feature that is native to the Builder is recommended instead.

Creating a snippet

Snippets can be found and managed from Content > Snippets. This page provides buttons to create a new text or HTML snippet.


This option can be used to save content as plain text and is useful for personalisation purposes, rendering attributes linked to a specific user profile or device. It can be used in combination with programmatic syntax to follow the desired logic. Xtremepush uses the Twig syntax for dynamic content. For further information you can review Twig's official documentation.



You can use this option to save sections of HTML code.

The editor can be used in code mode or in visual mode. To enter raw HTML click on the Source button. Once you have finished editing your raw HTML, click on Source again to come back to the visual mode, and the system will render the HTML entered. You can only save code changes in visual mode.

When using this feature it is important to bear in mind how this content will fit into the your larger template's HTML. For instance, if you will use snippets for email campaigns, you may need to make sure you include mobile optimised styles to allow the snippet's content to remain flexible when viewed on smaller screens like tablets or mobile phones.


Using a snippet

Once you have created your snippet you will be able to use it in other areas of the platform.

You can insert and see the list of snippets created using the code button from the campaign builder.

Alternatively, when editing campaign messages users can add the snippet token syntax in the place in the builder where the snippet content should be rendered at the time of send. Snippets are referenced using the following Twig syntax:

{{ snippet('snippet_name') }}

For example:


The combined result at send time would then look like this:



Rendering of snippets

Snippets are rendered at send time and so any message which have already been sent will not be affected if you update the content of the snippet, only future campaigns will reflect this change.


Reporting on snippets

Clicks on links within HTML snippets are recorded and included in click analytics for the email channel. They are visible from Analytics > Channels > View Details > Clicked links.

Unfortunately, they are not yet available to view within the email click map.