SMS inserts

Common tags used in text messages

You can use all tags from Insert usage.

If the message includes links, you can automatically add parameters (such as UTM) and track click events by using {% preparelink %}{% endpreparelink %}. This will generate a redirect URL based on the hosting environment of your workspace:

If your workspace is hosted on:

  • Microsoft Azure EU, the default domain redirect URL is link.snrs.it,
  • Microsoft Azure USA, the default domain redirect URL is link.azu.snrs.it
  • Google Cloud, the default domain redirect URL is link.geb.snrs.it.

TIP: On the user interface in the Synerise platform, you can configure how the end user's identifier (UUID) is handled when a link contains end-user identifying parameters (snrs_cl and snrs_he); for detailed instructions, see the "Managing user context" section.

IMPORTANT: Percent-encode any special characters in the URL before you add the link to the message. For example, encode a space as %20. Encoding is your responsibility as the sender; Synerise doesn't encode links for you. For the encoding rules, see RFC 3986: Uniform Resource Identifier (URI): Generic Syntax.

Usage

Use absolute URLs that include the scheme, for example https://example.com/promo. Relative links (such as /promo) and protocol-relative links (such as //example.com) aren't supported. If you use them, the tag generates a link that doesn't work. Don't put mailto: or tel: links inside preparelink, because the message fails to render and gets the notSent status.

{% preparelink %}YOUR_URL{% endpreparelink %}

Example of the destination URL after the redirect, with the parameters added:

https://example.com/?snrs_medium=sms&snrs_action=sms.click&snrs_test=false&snrs_var=4715029&snrs_cp=6b716f86-a14d-4b8c-8795-872f7432a046&snrs_cl=b5d8c721-c2b7-42ac-9cd5-7714dedf73bf&snrs_category=client._DEVICE_.sms&snrs_he=1940871749&snrs_ws=0f8e2c4a-3b1d-4e6f-9a7c-5d2b8e1f4a6c&snrs_redir=1

Configuring a custom domain for redirect URL

In text messages, links created with preparelink and links shortened with shorturl use separate domains. This section describes the custom domain for preparelink. To use your own domain for shortened links, see Custom subdomain for shortened links.

If you have already set up a custom domain (for example, for first-party tracking), you can use it immediately without any additional configuration - contact Synerise Support for assistance. Otherwise, to set up a custom domain for the redirect URL, meet the following requirements:

  • If you want to provide your own certificate:1. Prepare an X.509-format certificate. 2. Deliver the following files to Synerise Support:
    - private key (key.pem) - Fullchain certificate (fullchain.pem):
    - The leaf certificate must be the first in the file. - Intermediate certificates must follow, from the lowest-level to the highest. - Do not include the root CA.
    IMPORTANT: - When you use your own certificate, it is your responsibility to monitor its expiration time and re-generate it. - Ensure that the fullchain.pem file is complete. Missing certificates or wrong certificate order may cause SSL/TLS errors.
  • Send the SSL certificate to Synerise Support or give an approval for generating a certificate through Let's Encrypt.
  • Configure DNS - add the CNAME record. Depending on the cloud where your workspace is hosted:

    • for Microsoft Azure EU, set the CNAME to: link.snrs.it
    • for Microsoft Azure USA, set the CNAME to: link.azu.snrs.it
    • for Google Cloud Platform, set the CNAME to: link.geb.snrs.it
  • Submit a customer service request for configuring your domain in Synerise.

Preview in messages

If you use a custom redirect URL, the links in the message preview still use the default domain. The custom domain is applied while sending the messages to customers.

If you send links in text messages, you can use a Jinjava code to shorten the URL addresses to make the text message look professional and the link more reliable.

  • The default domain of the shortened links is snrs.it. If you want to use your own domain, see Custom subdomain for shortened links.
  • The shortened links don't require HTTPS. If you include a link with http:// in the message, it will be redirected to HTTPS when opened.
  • You can combine short link insert with prepare link to track URL's parameters (such as UTM) and click events from a message.

WARNING: The shortened link is valid for 14 days from the date the message is sent.

IMPORTANT: Percent-encode any special characters in the URL before you shorten it. For example, encode a space as %20. For the encoding rules, see RFC 3986: Uniform Resource Identifier (URI): Generic Syntax.

Jinjava code Description
{% shorturl %}YOUR_URL{% endshorturl %}
The URL is shortened, however, the clicks aren't collected.
{% shorturl %}{% preparelink %}YOUR_URL{% endpreparelink %}{% endshorturl %}
The URL is shortened and the clicks in the link are collected, so this event can be used in analyses.

Example

{% shorturl %}{% preparelink %}https://example.com/season-discounts/?utm_source=examplecom&utm_medium=slider&utm_content=examplecom&utm_term=discount-amazon-perf-2_W3&utm_campaign=Campaign-OnGoing{% endpreparelink %}{% endshorturl %}

Canonical URL: https://hub.synerise.com/developers/inserts/sms