Setting Up an HTML Embed Code for Survey

Create a new survey for email integration

Follow this guide to build a survey for your custom integration.

Update your email template

Navigate to SURVEYS in the main menu, locate the new survey SETTINGS/APPEARANCE > select EMAIL TEMPLATE.

If you plan to use the template in one of the predefined platforms, select the platform from the list. Then copy & paste the code into your platform.

The following platforms are available: Intercom Emails, Mailchimp, Hubspot, Klaviyo, Calendly, ActiveCampaign, Sendgrid, Mailgun, and Outlook.

If you don't find your platform on the list, you will edit the HTML code manually.

How to edit the HTML code snippet

First, let's look at the components of the HTML code snippet.

You need to edit the survey link which consists of mandatory and optional parts.

Understanding the survey URL link

Your customers will be redirected from the email to your Nicereply Survey Landing Page via a unique URL.

Such a URL may look like this:

This URL holds and passes the following parameters:

  • "my-company" unique name of your company within Nicereply based on your sign-up data (mandatory)
  • "jack-daniels" unique ID of the agent inside your help desk and username inside Nicereply (mandatory)
  • "12345" unique ID of the conversation/ticket/deal in your help desk (optional)
  • "?s=10" predefined rating value based on the metric (mandatory)

Another example of a URL link holding 3 different variables:

Understanding the query string

A query string is a part of a URL that follows ? (question mark symbol). It's used to pass specific information to a web application – in this case, a Nicereply survey form.

You can pass the customer's email or name by utilizing a query string.

    • For email: customer_email=corresponding merge field
    • For name: customer_name=corresponding merge field

  1. Placeholders or Merge Fields: These are predefined tags that are replaced with real data by the system.
    • Example: Mailchimp's merge tags list can be found at Mailchimp Merge Tags Cheat Sheet.
    • Relevant tags for our purpose: |FNAME|* for the first name, |EMAIL|* for email.
  2. Filling Query Strings Dynamically:
    • For email: customer_email=*|EMAIL|*
    • For name: customer_name=*|FNAME|*
  3. Final HTML code embed for Mailchimp:

Next, find the variables in your platform that refer to the parameters of Nicereply's survey link and edit the code accordingly.


You can use text-based rating links in your HTML email templates.

<strong>How nice was my reply?</strong><br /> <a href="{{}}/{{}}/?s=10">Awesome</a> <a href="{{}}/{{}}/?s=5">Nice</a> <a href="{{}}/{{}}/?s=1">Bad</a><br>

Or even incorporate the images inside the Rating link (put no spaces between <a> tags):

<strong>How nice was my reply?</strong><br /> <a href="{{}}/{{}}/?s=10"><img alt="Awesome" src="{{}}/face_10.png" /></a><a href="{{}}/?s=5"><img alt="Nice" src="{{}}/{{}}/face_5.png" /></a><a href="{{}}/{{}}/?s=1"><img alt="Bad" src="{{}}/face_1.png" /></a><br>

I recommend that you check out more tips on how to customize your email signature.