Feedback
User feedback enables Mapbox to measure and continuously improve your users’ experiences across all the phases of a trip. Including feedback UI in your application allows users to provide useful feedback and effectively update data where required, get enough data points to make improvements, and determine where routing issues exist for review and correction. Mapbox’s goal is to make sure that any negative experience does not happen a second time, user input scales as we make corrections, and each navigation experience gets the attention it deserves. Mapbox’s Data Services team cares deeply about listening to users, making corrections to our service, and improving the quality of our feedback signals.
There are two options to show feedback UI in your application:
- Presenting a standard feedback form. This option uses feedback UI provided as part of
MapboxNavigationUIKit
package. Choose it if you want quickly integrate our well-tested feedback screen. - Sending feedback programmatically. Use your own feedback UI implementation with feedback API from
MapboxNavigationCore
package. Choose this option if you want higher customization and flexibility.
Presenting a standard feedback form
For the simplicity and speed of the Navigation SDK integration, we provide a ready-to-use feedback screen FeedbackViewController
, which can be configured with a list of feedback categories.
There are three available configurations:
- active guidance
- free drive
- custom
Active guidance configuration
This configuration shows feedback categories specific to active turn-by-turn navigation: incorrect routes, road closures, etc. See ActiveNavigationFeedbackType
for the complete list of top-level categories.
If you already present a standard active navigation interface using NavigationViewController
, a feedback button is located in the corner of the map by default. Tapping this button will open a standard feedback screen with the active navigation configuration. To hide this button, set the NavigationViewController.showsReportFeedback
property to false
.
If you have a custom navigation screen and don't use NavigationViewController
directly, you can create FeedbackViewController
in your code like this:
func feedbackButtonTapped() {
let eventsManager = navigationProvider.eventsManager()
let feedbackViewController = FeedbackViewController(
eventsManager: eventsManager,
type: .activeNavigation
)
present(feedbackViewController, animated: true)
}
Free drive configuration
This configuration shows feedback categories specific to the passive navigation (also called free-drive mode): incorrect traffic, wrong speed limit, etc. See PassiveNavigationFeedbackType
for the complete list of top-level categories.
Here is an example of presenting feedback view controller in passive navigation:
func feedbackButtonTapped() {
let eventsManager = navigationProvider.eventsManager()
let feedbackViewController = FeedbackViewController(
eventsManager: eventsManager,
type: .passiveNavigation
)
present(feedbackViewController, animated: true)
}
Notes for both active and passive configurations
Make sure to pass to the FeedbackViewController
the events manager from the eventsManager()
. Metadata from this navigation service will be included in the feedback, so we can investigate it easier. It is your responsibility to make sure that any metadata adheres to your privacy policy. You can inspect metadata using FeedbackEvent.contents
property.
Sending feedback programmatically
Use this option if you want a higher level of customization and flexibility. In this case, feedback flow consists of the following steps:
- As soon as a user taps your feedback button, capture current navigation metadata using
createFeedback()
. This method will return aFeedbackEvent
that contains the information that will help us to debug the issue. Make sure that call this method as soon as possible, before presenting your custom feedback UI because by default it makes a screenshot of the visible application content – map, banner instructions, speed limits, etc. Push notifications and other applications won't be a part of the screenshot. We capture the UI state to better understand the issue. If you don't want to share the whole UI state of your application, pass screenshot of only Mapbox views tocreateFeedback(screenshotOption:)
function. - Present your custom feedback UI and allow the user to select the feedback category and type in an optional description of the problem.
- Depending on the navigation mode, you are using call
sendActiveNavigationFeedback(_:type:description:)
orsendPassiveNavigationFeedback(_:type:description:)
to send the feedback to us for further investigation.
The FeedbackEvent
, that you obtained in the first step, contains the captured navigation state and confirms to the Codable
protocol, so you can write it to a file and submit it later. For example, you can ask the user to select a feedback category while driving but wait until later to enter the description. This follow-up step can be distracting to a driver, so waiting until the user has arrived or even the next time they open the application can improve safety and result in more reliable feedback, depending on the audience of your application.