GetFeedback Digital for Email is an excellent way of gathering Feedback on emails that are sent out. Whether it is to get insights into how well the last Newsletter scored or to get insights into how your Support team is doing. However, sometimes a little bit more context is very welcome. For example, which edition of the Newsletter did the Feedback come in for? Or, which client left Feedback for a particular Support agent? These questions can be answered by adding Custom Variables to your Email widget. In this article, I'll be informing you a little bit more about the different types of Custom Variables that can be used and how to set these up.
This guide consists of:
What do you need:
- A GetFeedback Digital account with access to Email
- Basic HTML knowledge
- A Text Editor (Atom, Visual Studio Code, etc.)
What are Custom Variables?
Custom Variables are essentially data points that can be used to gather additional information that can be added to a Feedback item. In general, these data points can give more context about the Feedback item, for example, the user who left Feedback, the tier the user is in, etc. Custom Variables consists of two elements, the name of the Custom Variable and the value of the Custom Variable. If we take the example of the tier, the name would be 'Tier' and the value would be the actual tier the user is in gold, silver, etc. Custom Variables come in two flavors, static and dynamic.
Note: To use Custom Variables for GetFeedback Email, the email client you're using has to support the implementation of HTML in your email template (footer, signature, etc.).
Static Custom Variables
The static variant of Custom Variables are the Variables where both the name and value are predefined. Let's take the tier as an example again, let's say you're sending out a newsletter to users in the 'Silver' tier. The name of your Custom Variable would be 'Tier' and the value would be 'Silver'
Dynamic Custom Variables
The dynamic variant of Custom Variables only has the name predefined. The value of the Custom Variable is not predefined, instead, a placeholder is configured that can be read by the email client you're using. By doing this, the value of the Custom Variable will be whatever information is supplied through the placeholder. For example, a newsletter is sent to all of your users which are in different tiers. When users from the 'Gold' tier give feedback, the value of the Custom Variable will be 'Gold' but when users from the 'Silver' tier give feedback, the value of the Custom Variable will be 'Silver'.
Note: In order to use dynamic Custom Variables, the email client you're using has to allow the use of variables as placeholders. To verify whether your email client allows this, contact your supplier who can provide you with this information.
Setup
Now that we know all there is to know about Custom Variables for Email, let's set them up. Whether you're about to set up static Custom Variables or dynamic Custom Variables, for the most part, the setup is the same.
Let's start by copying the HTML of our widget. Navigate to the 'Setup' page (1.) in the Email product and select 'Widget installation instructions' (2.) of the widget you want to add Custom Variables to:
After clicking 'Widget installation instructions' you will be presented with 3 ways of installing the widget. Adding Custom Variables can only be done by editing the HTML of the widget, so we're going for option number 2. Simply click 'Select' and copy the selected HTML:
Once you've copied the HTML, open a Text/Source code Editor of your choice and past the HTML there. At first, the HTML will probably look like this:
To clean it up a bit, save the widget as a .html file and run a Format or Beautify command, which will result in something like this:
Right now, you might have a better clue of how our widgets are set up, it consists out of hyperlinks (<a href> tags) and images (<img> tags). The Custom Variables will be added to all of the links in your widget, in the case of my example, I have 6 of them:
Adding Custom Variables to your widget can be done by adding the following line to each of the links in your widget:
&<Variable Name>=<Value>
In the case of static Custom Variables, you're predefining both the name and the value of the Custom Variable. So if I would like to add the Silver tier as a static Custom Variable, the addition to the links in my widget would look like this:
&Tier=Silver
Tier, name of the Variable, defined by me.
Silver, value of the Variable defined by me.
However, if you'd like to go for dynamic Custom Variables, we would have to define the placeholder instead of the actual value. For instance say we use Frontapp as our email client. Frontapp identifies placeholder like this: {{Data}}. The placeholder for the recipient of my email is defined as {{recipient.email}}. If I would like to add the recipient of my email as dynamic Custom Variable to my widget, the HTML I would have to add to my widget would look like this:
&Recipient={{recipient.email}}
Recipient, name of the Variable, defined by me.
{{recipient.email}}, value of the Variable, will be replaced by the actual recipient of my email because the email client recognizes it.
Note for Salesforce users:
If you have purchased our Salesforce app, and would like to push custom variables with your feedback into your Organization, you will need to use one of the pre-defined custom variable field names instead of defining your own. There are a total of five pre-defined field names for variables in the Salesforce app. For more information on these fields, please see the section titled "Custom Variable Lookup field" in our installation guide here.
If we go back to the Recipient example above, in order for this variable to become available in Salesforce, your code should use one the pre-defined variable field names like this:
&integration_sf_01={{recipient.email}}
The Result
Once you've successfully been able to add Custom Variables to your widget and you're starting to receive Feedback, the Custom Variables can be found by opening a Feedback item:
Success: I hope I was able to help you get a better understanding of Custom Variables in GetFeedback Digital for Email and help you set them up as well. Feel free to browse around and if you have any questions for us, reach out to support@usabilla.com.