Documentation / Product / Integrations / SurveyMonkey

SurveyMonkey: Best Practices

Lytics recommends the following best practices for collecting identifiers from SurveyMonkey and using your survey data to build audiences in Lytics.

Collecting Identifiers

There are three ways to collect identifiers from SurveyMonkey surveys in order of complexity:

  1. Use SurveyMonkey's built in contacts and mailing service and the email invitation collector.
  2. Add custom variables to your survey and use a web link collector in SurveyMonkey.
  3. Add a question directly asking for an identifier.

Method 1

This is the easiest to setup. Just follow SurveyMonkey's instructions to send out your survey by email to a list of contacts. The recipient's email address will be included in their responses and will allow them to be merged with their Lytics profile when imported.

Method 2

This method takes a little more setup, but is much more flexible in delivery options. Your surveys will need to have custom variables added to them and will need to have the user's information inserted into the web link collector's URL. Depending on your delivery method, specific instructions on how to insert identifiers into the web link collector's URL will vary.

The SurveyMonkey Import will automatically use the lytics_email and lytics_uid custom variables as identifiers. lytics_uid should be a Lytics uid. You can export the uid to a tool that sends the survey link, or retrieve the uid from the Lytics JavaScript tag to embed or link to the survey from a webpage. lytics_email should be the user's email address that is stored in Lytics. Additional custom variables can be used, but will need to be mapped in LQL to be used in Lytics.

Method 3

This method is the most complicated to configure. It will require specific wording of questions on all surveys you want to track and custom LQL to implement. To implement this method you will need to create a question in your survey to collect an identifier. For example:

  • Please enter your email:
  • Please enter your username from our website:

You will then need to create custom LQL to recognize the responses to these questions as identifiers so the responses can be merged into the user's profile. Using the example questions above, the LQL would look something like:

    SurveyMonkey Responses

    collection_mode                                                  AS sm_collection_mode    SHORTDESC "SurveyMonkey Collection Mode"
    , response_status                                                AS sm_response_status    SHORTDESC "SurveyMonkey Response Status"
    , match("questions_answers.")                                                AS sm_question_answer    SHORTDESC "SurveyMonkey Question Answer"      KIND map[string]string
    , epochms()                                                      AS sm_last_response      SHORTDESC "Time of Last Survey Response"      KIND DATE

    -- Unique ID's, By Fields
    , email( oneof(``,`custom_variables.lytics_email`,`questions_answers.Please enter your email:`))  AS email  SHORTDESC "Email"
    , set(`custom_variables.lytics_uid`)                                            AS _uids  SHORTDESC "Web Cookie Ids(all)"
    , `questions_answers.Please enter your username from our website:` AS username SHORTDESC "Username"

FROM surveymonkey_responses
INTO user BY email OR username
ALIAS user_surveymonkey_responses

Only questions with the exact wording used in the LQL will be recognized as an identifier, this includes capitalization and punctuation at the end of the question. Using the example LQL above, the following questions would not be recognized as containing an identifier:

  • please enter your email:
  • Please enter your email
  • enter your username:
  • Please enter your Username from our website:

This is the only method that works with all SurveyMonkey collector types, but due to the added complexity, we recommend using one of the other methods if possible.

Using Survey Data

By default, all questions and answers are stored in a map field, question_answer, on the user profile. This can be difficult to use as the map keys will be a truncated version of the question text.

We recommend creating custom LQL mappings for questions that are relevant to your marketing audiences. Questions and their answers are placed into the surveymonkey_responses stream in the field questions_answers. They are stored as a map with the question text as the map key, and the answer as the value. Long questions will be truncated. Questions should be kept as short as possible.

For example, if you wanted to create an audience around users that were planning to retire soon you might have a true/false survey question like: Are you planning to retire in the next year?

This will appear in the Lytics stream as: questions_answers.Are you planning to retire in the next year?

This can be difficult to use in an audience definition, so we suggest remapping it using LQL like:

`questions_answers.Are you planning to retire in the next year?` AS retire_next_year SHORTDESC "Planning Retirement Next Year"

This would remap the response to the user field retire_next_year for use in Lytics audiences.