Template tags

Read time: 5 minutes | Learn about Gecko's powerful mail merge tags.

Jonny Richardson avatar
Written by Jonny Richardson
Updated over a week ago

Template tags (sometimes called mailmerge tags) are a fantastic way to personalize any messages you send through Gecko dynamically.

There's no charge for using template tags and no limit on the number of tags that can be pulled into your messages.


Engage

Template tag uses extend beyond simply personalizing email and text messages. Tags can pre-populate forms, create unique email subject lines, dynamically update contact fields via workflows, and create bespoke landing page content.

How to use template tags

Template tags take information in Gecko (from the contact record, an event, a form response, etc.) and dynamically insert it in your communications.

There are two ways to add tags to your messages:

1. Input Template Tags

Open an email or SMS template. Underneath the message body, you'll see the Input Template Tags section. Select the area from Gecko where you'd like to pull the information (Contact, Event, Response), select the attribute you'd like to pull into your message, and click + to insert the tag.

For example, if I wanted to pull in the student's name into my message, I'd pick Contact > Full_name > First Name and click + to insert the tag. This would add the following tag to my message:

{{contact.full_name.first_name}}

πŸ’‘ Note: Drag & Drop email builder users won't have an Input Template Tags section. When using a Text content block, click Merge tags or type an @ symbol to see available tags.

2. Manually

Template tags can be constructed anywhere if you know where to look in Gecko.

  • Contacts - If you're looking for the correct template tag for a contact field, you can go to Settings > Contact Fields and find the contact field you'd like to pull into your message.

    Imagine we want to pull the student's program of interest into our message. We already know we're referencing information in a contact field, so our template tag must begin with {{contact}}.

    The Template tag column shows us the correct tag to use is program_of_interest. All we need to do now is to combine both to give us our tag:

    {{contact.program_of_interest}}

  • Responses/Forms - Pulling in values from fields on your forms is easy. Click into your form, edit the field whose value you want to reference in your message, and make a note of the value in the Template Tag field:

    As this field is a response field, our template tag will begin with the tag {{response}}. All we need to do now is to combine both to give us our tag:

    {{response.field2621}}

    Tags beginning with {{response}} only work when sent from a form that contains a response field with the corresponding template tag. Learn more here.


Popular tags

A screenshot of the template tag library document.

Gecko supports a mind-bogglingly large number of template tags. Find an (almost) complete list here, with helpful examples and variants.


Troubleshooting

Template tags are powerful but can be tricky when first getting to grips with them. Here are some common issues and solutions:

πŸ”Ž Issue: Why aren't my template tags showing in my message

Some template tags (any that begin with {{event}} or {{response}}, for example) will only work depending on where in Gecko you send the message template from.

Let's illustrate this with an example. The {{event.rsvp_link}} template tag provides a link to a self-service portal so students can manage their event booking. The tag instructs Gecko to do two things: 1. Go to the {{event}} area of Gecko and 2. retrieve the corresponding RSVP link for the contact receiving the email. As this event begins with {{event}} it will only ever work if sent from an event.

But why? Accounts can run thousands of events at any given time. {{event}} relates to one specific event. If, for example, you try sending your template with this tag through a form workflow, Gecko won't know which of the hundreds of events on your account to send the rsvp link for. As a result, the {{event.rsvp_link}} in your email will be blank.

Other reasons your tags may not be appearing include:

  • Using the incorrect tag.

  • Incorrectly applying styling (such as making part of the tag bold) and breaking the tag in the HTML code.

    Sending a test email from a template.
  • Sending a test email from within a template. Doing this will mean the email isn't being sent to a Gecko contact and will, therefore, be unable to reference the majority of tag-related data.

If you've checked your link syntax and are sure it's correct - and you're also sure that the student has a value in the field you've tried to pull into your link - then we recommend you contact the support team! Whilst in Gecko, click your name in the top-right corner, click Contact Support, or email us at support@geckoengage.com.

πŸ”Ž Issue: How do I stop tags from breaking my pre-populated form links?

Using template tags to dynamically insert values that contain white/blank spaces into a URL can break the link. Let's illustrate this with an example; imagine we send a pre-filled form to two students (Student One and Student Two) where it pre-fills their selected major of interest and their name. This is the link we send:

https://app.geckoform.com/public/#/modern/link?major={{contact.major}}&name={{contact.full_name.first_name}}|{{contact.full_name.last_name}}
  • Student One has a major of interest of Business

  • Student Two has a major of interest of Computer Sciences

Notice the blank/white space in Student Two's major of interest selection ("Computer", " ", "Sciences"). When sent to each student, these are the results.

Student One receives a fully working and complete link:

https://app.geckoform.com/public/#/modern/link?major=Business&name=Student|One

Student Two, however, receives the following - abruptly cut off at the first blank space:

https://app.geckoform.com/public/#/modern/link?major=Computer

The problem is that Gecko needs to be instructed to ignore/encode the space as an HTML character. The fix is simple. We'd need to adjust our original link and tell Gecko to encode these spaces. Our sharing link would become:

https://app.geckoform.com/public/#/modern/link?major={{contact.major|url.encode}}&name={{contact.full_name.first_name}}|{{contact.full_name.last_name}}

Notice how the {{contact.major}} has now been updated to become {{contact.major|url.encode}}. In plain English, any spaces in values pulled into this part of the link will not break the link.

When sent to Student Two, this updated link would return the following perfect link:

https://app.geckoform.com/public/#/modern/link?major=Computer%20Sciences&name=Student|Two

|url.encode can be added to any template tag and is an excellent safeguard against errant spaces!


Chat

Mailmerge tags can be inserted into any messages from any channel on the Chat platform.

How to use mailmerge tags

Tags can quickly be introduced into any message you send from the Chat platform. These could be:

  • Typed messages in the Conversations view

  • Automatically triggered messages using Workflows

  • Bot messages

  • Any Saved Replies you've created

Mailmerge tags allow you to customize your messages with information you know about the contact you're speaking with or the Chat agent handling their reply.

To use mailmerge tags in Chat, click the Mailmerge Tag Builder icon at the bottom of text input fields throughout Chat, find the value you'd like to reference in your message, and click Insert.

An example of the Mailmerge Tag Builder icon.

Any questions? Start a live chat with a support team member, or feel free to explore the rest of our academy. Spotted an error or want to suggest a future article for the academy? Let us know here.

Did this answer your question?