How to set up custom variables while programming a survey using Survey Analytics. Custom Variables, Analysis, External Reference Variable, Survey Software, Online Surveys, Survey Analytics

Custom Variables

How can I pass in additional information to the Survey?

You can pass in additional information in the Survey using Custom Variables.

What are Custom Variables and where are they stored?

Custom Variables are special variables used to store additional information that is to be passed to the Survey. Custom Variables when passed to the Survey are stored with the Respondents Response. You can view the Custom Variables online using the Response Viewer. Custom Variables are also available in the Excel and CSV Raw Data downloads. You can also analyze your data based on Custom Variables.

To track e-mail addresses / Custom Variables please use the Respondent Tracking link when sending emails via SurveyAnalytics Email Management.

What are the limits on Custom Variables?

You can upload up to 255 custom variables.

Each Custom Variable can store up to 128 characters.

You cannot use a Comma (,) or the Pound/Hash (#) sign in the Custom Variables.

Note: If you are passing the Custom Variables / External Reference Variable via the URL please limit your use to Alphanumeric Characters (A to Z, a to z, 0 to 9). Avoid use of Special Characters: Space Character (" "), Pound/Hash character ("#"), Ampersand ("&"), Percent character ("%"), Question Mark ("?"), etc.

How to pass in the Custom Variables?

When using SurveyAnalytics Email Management tool you can upload the Custom Variables with each respondents email address. For more information please visit the Upload Custom Variables link below. If you are Not using SurveyAnalytics Email Management tool for distribution then you can pass in Custom Variables along with the Survey URL. Following is the format for passing in the Custom Variables: After the URL (page name) we use question mark ( ? ) to start the variable data pair and we separate each variable data pair with one ampersand ( & ) mark. Example Survey URL: Custom Variables are passed as follows:

Do Custom Variable support multi-lingual characters?

Yes, you can upload Multi-lingual characters as Custom Variables. Limited special characters are also supported.

Where can I use the Custom Variables?

Custom Variables can be used in Questions / Answer Options on the Survey. You can also use Custom Variables in the Email Invitation. For more information please visit the Personalizing Email Invitations link under Additional References.

How to use Custom Variables?

To display the Custom Variables on the Survey / Email Invitation / Thank You page you can use the following tags for the corresponding Custom Variables:

Custom Variable 1: ${custom1}

Custom Variable 2: ${custom2}

Custom Variable 3: ${custom3}

Custom Variable 4: ${custom4}

Custom Variable 5: ${custom5}

Custom Variable N: ${customN}

You can also prepopulate the Open Ended text type question on the Survey. For more information please visit the Advanced Dynamic Replacement of Custom Variables link under Additional References.

Also visit the Personalizing Email Invitations link under Additional References.

Can the Custom Variables be used for Analysis?

Yes. You can set up Grouping based on the Custom Variables. For example if you have uploaded the Department as Custom Variables. Then you can setup Groups for each department and run analysis separately for each Department.

What are Triple DES Encrypted Custom Variables?

This security option allow you to pass additional data to the survey using Triple DES encryption. You can pass data through the survey URL in encrypted format, the data will be decrypted and saved as part of the response.

How can I set up Triple DES encryption?

To enable Triple DES encryption setting go to:

Edit Survey >> Security

Under the 'Security' tab click on the Triple DES Encrypted Custom Variables switch

Now text box will get open with label Secret Key

Enter the 24-character key to encrypt/decrypt the custom variables.

Click on Save Changes

Sample Java Code to encrypt variable

                package com.encryption;

                import javax.crypto.Cipher;
                import javax.crypto.SecretKey;
                import javax.crypto.SecretKeyFactory;
                import javax.crypto.spec.DESedeKeySpec;
                import javax.xml.bind.DatatypeConverter;

                public class Encryption {

                    public static void main(String[] args) {
                        try {
                             String encryptedString = encryptTripleDES("Survey", "ThisIsSecretEncryptionKey");
                        } catch (Exception e) {

                    public static String encryptTripleDES(String unEncryptedString, String secretKey) throws Exception {
                        String encryptedString = null;
                        Cipher cipher = Cipher.getInstance("DESede");
                        SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("DESede");
                        byte[] keyByte = secretKey.getBytes();
                        KeySpec keySpec = new DESedeKeySpec(keyByte);
                        SecretKey key = secretKeyFactory.generateSecret(keySpec);
                        cipher.init(Cipher.ENCRYPT_MODE, key);
                        byte[] plainText = unEncryptedString.getBytes("UTF8");
                        byte[] encryptedTextByte =  cipher.doFinal(plainText);

                        encryptedString = DatatypeConverter.printBase64Binary(encryptedTextByte);

                        return encryptedString;

11. Screenshot

Survey Software Help Image

12. Screenshot

Survey Software Help Image

13. Screenshot

Survey Software Help Image

What is the External Reference Variable?

External Reference Variable is an another variable which can be used to pass in data to the Survey. The External Reference variable (i.e. ext_ref) is used to associate responses to their respondents. You can assign an ID number or anything else that will uniquely identify a respondent to the ext_ref variable. When the results are collected the ext_ref variable is captured and stored with the other data.

How can I use the ext_ref variable with my own email program/provider?

Every survey that you create will have a unique URL. To include other data to be captured along with the survey data you just need to add the ext_ref parameter to the URL. For example:


Replace xxxx with your unique id for the respondent.

I am using Customized URL. How to pass the ext_ref variable with customized URL?

The ext_ref parameter can be passed along with the URL in the following format:

For Example: The URL for the survey is:

The ext_ref tag is appended as follows:

Are there any limitations?

The External Reference Variable can store up to 64 characters.

You can use Alphanumeric Characters (A to Z, a to z, 0 to 9).

Accented characters or characters from languages other than English may not get saved. Please limit the character use to English.

You cannot use the Pound/Hash [#] in the External Reference Variable

We recommend you not to use Comma and Quotes in the ext_ref/custom variable.

How can I use the ext_ref with the Email/List Manager?

If you are using the Email/List Management interface to send out email add the following tags to your survey invitation:


The &ext_ref variable is automatically captured in the raw response data.

Note: The mail merge tags are special variables that are used in Email List Management in tracking the email addresses of respondents. Simply append \ the &ext_ref=xxxx to the end of the mail merge tags.

How can I limit the custom variables to be captured in Survey URL ?

Go To:

  • Login »  Surveys »  (Select Survey) »  Edit Survey »  Settings »  Custom Variable Capture Limit

1. Screenshot

Survey Software Help Image

You can limit the custom variables captured in the Survey URL by setting the Custom Variable Capture Limit. For example if you set the Custom Variable Capture Limit as 8(custom8) and you add Custom Variable 9(custom9) in the survey URL then Custom Variable 9(custom9) will not be captured.

Ready to start listening to your customers? FREE TRIAL