Geolocation for surveys

One of the keys to a survey is associating the results with a Unit. Surveys often ask the survey taker to identify the unit, typically by selecting the unit from a Nested dropdown menu. Geolocation filters the dropdown list to show only units physically near the survey taker at the time the survey is taken.

Geolocation is useful when:

  • The survey taker cannot identify the unit because there are many similar units of the same name in close proximity, such as a company with many hotels, restaurants, or auto service stations all with the same brand name.

  • The survey taker does not associate the company with the place where they interacted with the unit. Consider a food service at an event arena where the person knows the name of the venue, but not the name of the food service running the concessions.

  • The company is looking to optimize response rate by reducing the survey taker's effort when selecting a unit.

This image shows all company's branches (units) in different nearby locations that share the same name:

Survey displayed on a mobile device showing different nearby branches (units).

When a survey uses geolocation to identify nearby units, the device first prompts survey takers to allow the survey to use their current location. When device-based geolocation is not available, it falls back to IP region, which may minimally impact accuracy in some cases.

Experience Cloud then uses the current location to identify a subset of the company's units near the location, and that set is presented to the survey taker. If survey takers do not allow the survey to know their location, or if the they choose Find other locations, the survey defaults to standard behavior for the Nested dropdown, which is to narrow the selection through a series of menu selections.

iOS prompt asking '"survey.medallia.com" would Like To Use Your Current Location'.

Restriction: When using v6 designs, Geolocation only supports mobile devices.

Unit location

Geolocation works by knowing the latitude and longitude (the geocode) of the company's units as defined in Unit type's Data fields. As such, the coordinates must be imported for each unit. Experience Cloud does not perform geocoding (such as look-up by address); rather, it is up to the company to provide the geocode for each of their locations.

Important: Latitude and longitude coordinates must be an Integer Data types, not fractional. For example, a latitude of 45.247369 must be specified as 45247369, which can be achieved by multiplying the decimal value by 1,000,000.
Tip: There a several free and commercial services that provide geocoding of addresses. For example, the United States Census Bureau provides a free Geocoder API for U.S. addresses, and Google provides a similar Geocoding API for U.S. and international addresses and places.

Import geocodes in bulk

If you are defining the geolocation for multiple units, you may bulk import the latitude and longitude coordinates for the units using an Importer of Organization type to map it to Latitude and Longitude Data fields. For more information, see Data mapping.

Configure the survey

Complete these steps to configure an anonymous survey for geolocation:

Important: Experience Cloud only supports geolocation over HTTPS (secure URL).
  1. From the Survey editor, click the options icon from the survey structure pane. Choose Edit survey settings from the the menu. This replaces the Survey structure pane with the Survey settings pane. Click Show advanced settings and check Enable use of user location.

  2. Create at least two pages:

    • The first page automatically includes a Begin survey button to navigate to the next page. Page navigation is what triggers the survey to request the device's current location.
      Warning: Button label must always be Begin survey for geolocation to work. For more information, see Empty pages.
    • The subsequent page should have the unit selector using the Nested dropdown.

  3. Add a Nested dropdown to a page (not the first page) and configure Show relevant units based on the survey taker's location on the Advanced tab. Consider:

    • The maximum count of units you can include on the list is 10. However, best practice is to use smaller sets of no more than 5 to avoid confusing the survey taker. Remember, the point is to find the unit nearby.

    • If there are no units near the survey taker — within the Search radius — they have to use Find other locations to choose a unit.

    • The units order is based on the following:

      1. Units closest to the survey taker by geolocation.
      2. Units that are equidistant from the survey taker are displayed in alphabetical order.

When the survey is live, it shows nearby units in the dropdown selector.