What's inside it:
From all this bundle you would only need post-chat-survey-form.html and style.css located in the css folder (for advanced users only).
The window-features file can be opened in a text editor like Notepad or Notepad++. It has settings for the visible area within the chat window where the survey is loaded. In particular, it defines the window width and height which by default are set to 316 px and 496 px. If you kept the default size of your chat widget (370 x 590), don't change these values. But while editing the survey, you need to take them into account so that no part of the survey goes beyond the visible area.
The fastest way to check the changes you made is to launch the post-chat-survey-form.html file in a browser after each change (however, the confirmation window can be only checked during a chat).
To test the final editing results in real-life environment you will need to:
All components of the survey are encoded in the post-chat-survey-form.html file. Here is how you can customize the survey template with only this file involved:
To start making updates launch the post-chat-survey-form.html file in a text editor (a simple one that has no formatting options, like Notepad or Notepad++) and take a look at the code.
Post chat survey header is a bold text at the top of the survey.
The 5-star template has its header in the following block of the code:
<header class="vertical-align-wrapper">
	<h1 class="vertical-align">How did we do</h1>
	<div class="vertical-align">
		<div class="circle">?</div>
	</div>
</header>
To change the header text, just replace it in the code (text within tag <h1>
).
The question mark is added as a separate graphic element of the header, but you can remove it to gain space for a few more symbols in favor of the header text. To remove it, delete the line <div class="circle">?</div>
from the block (or you can comment it out putting the tags <!--
and -->
at each side of the line so that you can have it back at any moment). You can also change the question mark to any other character (including Unicode entities).
If you use a smiley/thumbs survey template, your header block will look like this:
<header>
	<h1 class="vertical-align-bottom">Happy with our service?</h1>
</header>
This template's header allows longer texts without breaking the layout. You can change text in the same way.
This part exists only in the 5-star survey template. All question blocks have the same pattern and are created with this code:
<div class="row-rating vertical-align-wrapper">
	<div class="rating-label vertical-align">Politeness:</div>
	<div class="rating-box" id="Politeness">
		<input id="rating1-5" type="radio" name="Politeness" value="5">
		<label for="rating1-5">5</label>
		<input id="rating1-4" type="radio" name="Politeness" value="4">
		<label for="rating1-4">4</label>
		<input id="rating1-3" type="radio" name="Politeness" value="3">
		<label for="rating1-3">3</label>
		<input id="rating1-2" type="radio" name="Politeness" value="2">
		<label for="rating1-2">2</label>
		<input id="rating1-1" type="radio" name="Politeness" value="1">
		<label for="rating1-1">1</label>
	</div>
</div>
First goes the block wrapper which includes the question text and a block with rates in the form of stars. Make sure to strictly follow the instructions below to keep your survey functional.
<div class="row-descriptions">
and below the last block of questions: <div class="row-rating vertical-align-wrapper">
	<div class="rating-label vertical-align">Proficiency:</div>
	<div class="rating-box" id="Proficiency">
		<input id="rating2-5" type="radio" name="Proficiency" value="5">
		<label for="rating2-5">5</label>
		<input id="rating2-4" type="radio" name="Proficiency" value="4">
		<label for="rating2-4">4</label>
		<input id="rating2-3" type="radio" name="Proficiency" value="3">
		<label for="rating2-3">3</label>
		<input id="rating2-2" type="radio" name="Proficiency" value="2">
		<label for="rating2-2">2</label>
		<input id="rating2-1" type="radio" name="Proficiency" value="1">
		<label for="rating2-1">1</label>
	</div>
</div>
<div class="row-descriptions">
<div class="rating-label vertical-align">question-text:</div>
, e.g.: <div class="row-rating vertical-align-wrapper">
	<div class="rating-label vertical-align">Attitude:</div>
<div class="rating-box" id="ID-of-the-question">
to a new one that would reflect the question, e.g.: <div class="row-rating vertical-align-wrapper">Note! Answers to the new question will appear under this new ID in chat transcripts.
	<div class="rating-label vertical-align">Attitude:</div>
	<div class="rating-box" id="Attitude">
name
in each <input>
of the block with the new ID from the previous step, ex.: <div class="rating-box" id="Attitude">
	<input id="rating2-5" type="radio" name="Attitude" value="5">
	<label for="rating2-5">5</label>
	<input id="rating2-4" type="radio" name="Attitude" value="4">
	<label for="rating2-4">4</label>
	<input id="rating2-3" type="radio" name="Attitude" value="3">
	<label for="rating2-3">3</label>
	<input id="rating2-2" type="radio" name="Attitude" value="2">
	<label for="rating2-2">2</label>
	<input id="rating2-1" type="radio" name="Attitude" value="1">
	<label for="rating2-1">1</label>
</div>
<input>
and attributes for
of each <label>
of the block (the part rating#-#
) - change the first digit of the values to the serial number of the new question (for example, you add the third question): <div class="rating-box" id="Attitude">Note! Each input must have a unique id throughout the survey.
	<input id="rating3-5" type="radio" name="Attitude" value="5">
	<label for="rating3-5">5</label>
	<input id="rating3-4" type="radio" name="Attitude" value="4">
	<label for="rating3-4">4</label>
	<input id="rating3-3" type="radio" name="Attitude" value="3">
	<label for="rating3-3">3</label>
	<input id="rating3-2" type="radio" name="Attitude" value="2">
	<label for="rating3-2">2</label>
	<input id="rating3-1" type="radio" name="Attitude" value="1">
	<label for="rating3-1">1</label>
</div>
Here is what we get after editing:
On the above example you see how the "Submit" button got partially hidden from the visible area and the scroll bar appeared. To fix this, you can remove the comments section, make the text area smaller, or reduce text size. But for the two latter options you would need to edit the CSS file of the survey, and it requires advanced skills. If you're on it, we'll talk about it in Part 2 of this article.
Select the block and delete it from the code (or comment it out using the tags <!--
and -->
).
Follow steps 2, 3 and 4 of the instructions from Add more questions to the survey.
The same way as with the header, each template has its own code for the comment section.
5-star survey comments block looks like this:
<div class="row-descriptions">
	<div class="descriptions-label vertical-align">Why you rated this way:</div>
	<textarea name="Comments"></textarea>
</div>
And the smiley/thumb survey comment block looks like this:
<div class="row-rating">
	<div class="rating-label vertical-align">Comments:</div>
	<textarea name="Comments"></textarea>
</div>
To hide the comment section from the survey, simply delete the block from the code, or comment it out using tags <!--
and -->
. Here is how the survey from our example looks with the comment section removed:
And this is the standard smiley/thumb survey with no comment section:
It has now a lot of empty space. This is the case when you can edit the window-features file and reduce the height of the visible area:
The confirmation window appears after a user submits the survey. The block with its content is located at the beginning of the <body>
section of the code.
The survey template confirmation block has the following code:
<div class="success-content">
	<header class="vertical-align-bottom">
		<h1 class="word-wrap">Thank you!</h1>
	</header>
	<div class="post-chat-survey">
		<h2>We greatly appreciate your feedback</h2>
		<div class="button-send">
			<button class="submit-btn" onclick="onClose();">CLOSE WINDOW</button>
		</div>
	</div>
</div>
The smiley/thumb survey template confirmation block has this one instead:
<div class="success-content">
	<header>
		<h1 class="vertical-align-bottom">Thank you!</h1>
	</header>
	<div class="post-chat-survey">
		<h2>We greatly appreciate your feedback</h2>
		<div class="button-send">
			<button class="submit-btn" onclick="onClose();">CLOSE WINDOW</button>
		</div>
	</div>
</div>
You can modify the following parts: header text (tag <h1>
), confirmation body text (tag <h2>
), and close button label (within tag <button>
).
Important: This section requires knowledge of CSS: basic concepts, rules and syntax. It supposes that you know how to create and modify a CSS code. We recommend skipping this part if you are not familiar with it.
The file responsible for the survey styling is called style.css and is located in the css folder. Here is what you can safely customize in your survey template through CSS:
We advise to not edit anything else, as some changes won't simply work, and others may break the survey layout and elements positioning.
We will continue working with the segments of code in the post-chat-survey-form.html file. These segments generate different parts of the survey – header, questions, comments section, confirmation texts. However, before we start let's look closer at the tags and class
attributes as these are the elements which the styles are applied to.
The CSS-property responsible for the font size is called font-size
. The values may differ in different survey types and for different survey elements. Try changing the values and check the result. If you want to add more questions to your 5-star survey, you may try smaller font sizes to fit everything.
To locate properties faster in the CSS code, press CTRL+F in your text editor and search for the tag or the class name.
The header text is formatted with the <h1>
tag, the style rules for it are described in this peace of CSS code in the style.css file:
(5-star survey)
h1 {
	margin: 29px auto;
	max-width: 280px;
	font-size: 22px;
	font-weight: bold;
	line-height: 40px;
	color: #529ad3;
	display:inline-block;
}
(thumb/smiley survey)
h1 {
	margin: 40px auto 0;
	max-width: 280px;
	height: 65px;
	font-size: 19px;
	font-weight: bold;
	line-height: 25px;
	color: #529ad3;
	display:inline-block;
}
Type a new value instead of the default 22
or 19
, but make sure to not add spaces between the value and the unit px
. Save changes once done.
Editing style properties for <h1>
will also affect the header of confirmation window.
The style for the white question mark in a colored circle is assigned in the post-chat-survey-form.html file through the attribute class="circle"
and is determined by the following CSS rule:
.circle {
	width: 40px;
	height: 40px;
	background: #529ad3;
	margin-left: 10px;
	-moz-border-radius: 20px;
	-webkit-border-radius: 20px;
	border-radius: 20px;
	text-align: center;
	line-height: 40px;
	color: #fff;
	font-size: 32px;
	font-weight:bold;
	display:inline-block;
	position:relative;
	top: 5px;
}
Find the property font-size
and alter the value.
If you also want to resize the colored circle, you will need to play around with values of the following properties: width
, height
, line-height
.
width
and height
define the circle size. But once you change them, you will notice that the question mark has drifted. And line-height
is responsible for this.
Decreasing its value will move the question mark up, increasing will move it down.
You can change the circle to a square too, by deleting (or commenting out with /*
, and */
) the following properties:
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
For the questions text, the style is determined through the rating-label
and descriptions-label
classes, here is their CSS codes:
(5-star survey)
.rating-label, .descriptions-label {
	color: #666666;
	font-size: 15px;
}
(smiley/thumb survey)
.rating-label {
	color: #529ad3;
	font-size: 15px;
	font-weight:bold;
	display: inline-block;
	padding: 0 0 0 10px;
}
Update the value of font-size
.
If you use a 5-star survey and want longer questions, you can move rating stars under them. To do that, delete vertical-align
from <div class="rating-label vertical-align">The question text:</div>
in the post-chat-survey-form.html file in every question block of your survey.
It is quite easy to locate the comments area element in the code: it's a single line <textarea name="Comments"></textarea>
and style is applied directly to the tagname:
textarea {
	width: 218px;
	height: 120px;
	margin: 10px 20px 0 20px;
	padding:10px;
	font-size: 14px;
	border-left: 1px solid #e0e0e0;
	border-top:1px solid #e0e0e0;
	border-right: 1px solid #ededed;
	border-bottom: 1px solid #ededed;
	outline: none;
	font-family: inherit;
	color:#222;
}
All that you need from this group of rules is height
. It actually defines the default height of the area which is resizable from the user's side. To make it convenient for users to enter their feedback, an area 2-3 lines high is enough, so you can take advantage of this property and reduce it in favor of other elements that require more space.
You can remove it at all, including the question, if you don't need it. We explained how to do it in the section Hide the comments section of the Part 1 of the article.
Confirmation header font size is automatically edited together with the survey header since they both use the same tag. As for the confirmation text, the style is applied to it through the <h2>
tag. Here is its CSS code and the font size property:
h2 {
	padding: 30px 25px 10px 25px;
	font-size: 17px;
	color: #666666;
	line-height: 25px;
	text-align: center;
}
Images in the surveys are created as vector graphics in SVG format. You can change their appearance by updating their SVG sources, or you can replace them with other images in SVG/PNG/JPG format. The image files are located in the images folder of the archive.
If you already have suitable samples of SVG images to use in your survey instead of the default ones, then you can simply replace them with your files in the images folder. To not do any extra editing in the codes, keep the same file names. If you use files of different forman, you'll need to update the files' names in CSS styles anyway.
We can show you how to change the orange color of stars when they are hovered over.
Open the file star-on.svg in a text editor and find in the code the following words: fill
and stroke
. fill
means the fill color of the star, stroke
– the color of its frame. They are in the HEX format widely used in HTML and CSS - #rrggbb. Replace values of both attributes with the desirable color and save changes. To check the result, open (or reload) the post-chat-survey-form.html file in a browser and move your mouse over the stars.
Please remember that once you upload the survey to your account, you won't be able to track the survey results in your chat statistics module. You can try to collect the post-chat survey results and customers' comments from chat transcripts and add them to your database, but this would require additional programming from your end, since we have no ready-to-use solutions for this purpose.
We can suggest general steps to follow to extract the survey results from chat transcripts:
The choice of the programming environment to create the parser is entirely up to you. Your team can use any tools they are comfortable with to implement the suggestion.
You can also try adding Google Analytics tag to your post-chat survey:
<head>
tag; By default, Google Analytics will track page visits (i.e. post-chat survey loads), but you can create custom reports in it to get more data.