Skip to main content
Template Creator
S
Written by Support Mailtarget
Updated over a week ago

Template Creator allows users to effortlessly upload HTML templates and seamlessly integrate them into Mailtarget. This documentation will guide you through the steps to upload your HTML template and use it within Mailtarget.

Uploading Your HTML Template

Navigate to the Template Creator menu through Configuration > Template within your dashboard and click Add Template button.

In this menu, you will automatically get a Template ID which you can copy later, then you have to add the Template Name.

When uploading your template, there are 2 options that you can use:

Paste your HTML code

In this method, you only need to copy your HTML code and paste it in the Mailtarget text editor. After you paste it in the text editor, don't forget to click the Preview Code button to see the resulting HTML code that you have created. You need to pay attention when writing HTML code, you have to correct it if there are errors in writing the code.

Upload HTML File

In this method, you need to upload your HTML template file to Mailtarget, don't forget to click the Preview Code button to see the resulting HTML code that you have created. Click Save if the template you created is correct.

Results on the dashboard when the template is successfully added


Edit Your HTML Template

You can edit your HTML template by clicking Template ID on the dashboard. Then you will see the details of your template, click the Edit Template button.

You will be directed to the text editor to make edits to your HTML template, edit according to your needs then click the Save button.


Add Test Data on your HTML Template

In the template creator, you can try adding test data in the form of shortcodes into your template to see how your template works, especially for personalization. Here's how you can do it:

Before add Test Data, you need to add shortcode that you want to test into your HTML code, then click Preview Code button to see the result. On the preview page, the shortcode {{firstname}} will appear, you have successfully added the shortcode, this shortcode will later be filled in with your test data.

You can add test data from when you first created the template or you can do this by editing the template you created before, then click the Test Data menu and click the Add Test Data button.

On this page, you will be asked to add data Key and Value. Key is a shortcode that you need to add to your HTML code, and Value is the test data. In example here, Key firstname is an example of personalization for calling the user's name, then Mike is an example of a user name.

Then you need to add the firstname shortcode to your HTML code according to your needs where you will add test data. You need to use double brackets for the shortcode, in this example it would be {{firstname}}.

After that, click the Preview Code button to see the results of adding the firstname shortcode to your HTML code. In the code preview section, Mike's data will be displayed as the value of the firstname key, click the Save button to complete the process.

If you are going to send the shortcode for your email template delivery, enter the following code:

"substitutionData":{
"shortcode":"SHORTCODE_VALUE"
},

Did this answer your question?