Page MenuHomePhabricator

SPIKE: figure out where to send app feedback
Closed, ResolvedPublic

Assigned To
Authored By
SBisson
Apr 7 2020, 2:21 PM
Referenced Files
F31790294: Screen Shot 2020-05-01 at 4.31.34 PM.png
May 1 2020, 8:44 PM
F31790295: Screen Shot 2020-05-01 at 4.37.06 PM.png
May 1 2020, 8:44 PM
F31790286: Screen Shot 2020-05-01 at 4.31.34 PM.png
May 1 2020, 8:38 PM
F31790287: Screen Shot 2020-05-01 at 4.37.06 PM.png
May 1 2020, 8:38 PM
F31783355: image.png
Apr 27 2020, 8:30 PM
F31783353: image.png
Apr 27 2020, 8:30 PM
F31783339: image.png
Apr 27 2020, 8:30 PM
F31783360: image.png
Apr 27 2020, 8:30 PM

Description

We would like to allow app users to provide feedback privately. See T236317: Allow users to provide feedback from within the app

The goal of this task is to figure out where and how to store the feedback. We would like to build our own UI and use an external service as storage.

Legal has approved the following services:

  • Google forms
  • Qualtrics
  • Survey Monkey

Event Timeline

• AMuigai triaged this task as Medium priority.Apr 8 2020, 1:20 PM

Intro recap

We want to build our own UI for user feedback and use an external service as storage, options include Survey Monkey, Qualtrics, Google Form. We want to collect feedback privately, no email address or phone number needed. The rest of the acceptance criteria is laid out in T236317.

The goal here is to figure out where and how to store feedback. The idea more o less translates to a feedback component in the KaiOS app that invokes an API to store a response. It’s understood then that we would like to be able visualize all feedback provided by users in one place. The general idea with each of the three tools we have as options is that they allow you to:

  • create a survey
  • add responses to the survey
  • view all survey responses.

Next is the investigation results for each option and some final thoughts at the end. My intention is to demonstrate some pros and cons and open up the conversation as to what would work best for us.


Survey Monkey

Summary

We can use the following API endpoint to create a response to a survey:

https://developer.surveymonkey.com/api/v3/?shell#collectors-id-responses

curl -i -X POST -H "Content-Type: application/json" -H "Authorization:bearer <auth token>" https://api.surveymonkey.com/v3/collectors/<collectorId>/responses -d '{ "pages": [{ "id": “<pageId>", "questions": [{ "answers": [ { "text":”<feedback message>" }], "id”:"<questionId>"}]}]}'

We must provide:

  • auth token
  • collectorId
  • pageId
  • questionId
  • the actual feedback message.

Investigation:

I found the Survey Monkey documentation to be in good shape, even though I did find at least one error in the documentation that took some time to resolve. I started by creating a Survey Monkey account using my @wikimedia.org email, with this I was able to create a survey from the regular Survey Monkey page, https://www.surveymonkey.com/. This is the survey we can add responses to, this is the survey that we could come and look at later to view all responses, this is a survey that users would not see. There’s an option to make the survey anonymous and I did that, more info here.

Besides creating the survey, I also had to create/register an app in the developer Survey Monkey page, https://developer.surveymonkey.com, note the url difference. I ended up creating a private app for this test (as opposed to public one, more info here). This is the draft app that I was able to use to test out API.

All the information that we must provide is obtained either from the developer page or the API itself:

These are the scopes I had to set in the developer page under settings:

image.png (2,030×710 px, 1 MB)

This is what a successful curl to POST a new response looks like, as witnessed by me while testing

curl -i -X POST -H "Content-Type: application/json" -H "Authorization:bearer 2jonZvtb...r72-q" https://api.surveymonkey.com/v3/collectors/258911010/responses -d '{ "pages": [{ "id": "121199368", "questions": [{ "answers": [ { "text”: “monkey test feedback message" }], "id":"456667008"}]}]}'
emedina@Eduardos-MacBook-Pro % curl -i -X POST -H "Content-Type: application/json" -H "Authorization:bearer 2jonZvtb...r72-q" https://api.surveymonkey.com/v3/collectors/258911010/responses -d '{ "pages": [{ "id": "121199368", "questions": [{ "answers": [ { "text":"monkey test feedback message" }], "id":"456667008"}]}]}'
HTTP/1.1 201 Created
Server: nginx
Date: Thu, 23 Apr 2020 20:39:06 GMT
Content-Type: application/json
Content-Length: 993
Connection: keep-alive
Set-Cookie: ep201=K9yiirknajIYTMuiIdarmYWlfoA=; Domain=.surveymonkey.com; Path=/; Expires=Thu, 23-Apr-20 21:09:05 GMT
Set-Cookie: ep202=2r3RvSgg/r6KJGgBHymhXrBwjgs=; Domain=.surveymonkey.com; Path=/; Expires=Wed, 22-Jul-20 20:39:05 GMT
Set-Cookie: ep203=pnXqgiyLyUqaHYc1s7GKfVmAq74=; Domain=.surveymonkey.com; Path=/; Expires=Wed, 22-Jul-20 20:39:05 GMT
Set-Cookie: attr_multitouch=I+MJZVjF2YzLiRMacwe1UUAHyk4=; Domain=.surveymonkey.com; Path=/; Expires=Sat, 24-Apr-21 02:39:05 GMT
X-Ratelimit-App-Global-Minute-Limit: 120
X-Ratelimit-App-Global-Minute-Remaining: 119
X-Ratelimit-App-Global-Minute-Reset: 54
X-Ratelimit-App-Global-Day-Limit: 500
X-Ratelimit-App-Global-Day-Remaining: 487
X-Ratelimit-App-Global-Day-Reset: 12054
SM-Request-ID: d33fb0d8-f037-4fbb-8926-438d8f3a6d0b
X-OAuth-Scopes-Granted: surveys_read,collectors_read,responses_read,responses_read_detail,responses_write,collectors_write
X-OAuth-Scopes-Available: users_read,surveys_read,collectors_read,collectors_write,contacts_read,contacts_write,surveys_write,responses_read,webhooks_read,webhooks_write,library_read
Access-Control-Allow-Headers: Authorization, Content-Type, Pragma, Cache-Control, X-Requested-With
Access-Control-Allow-Methods: POST, GET, PATCH, PUT, DELETE, OPTIONS, HEAD
Access-Control-Allow-Origin: *
Cache-Control: no-store, no-cache, max-age=0, private, must-revalidate
Vary: Accept-Encoding


{"id":"11532660507","recipient_id":"","collection_mode":"default","response_status":"completed","custom_value":"","first_name":"","last_name":"","email_address":"","ip_address":"","logic_path":{},"metadata":{"respondent":{"user_agent":{"type":"number","value":19033615.0},"language":{"type":"string","value":"en"}},"contact":{}},"page_path":[],"collector_id":"258911010","survey_id":"282631365","custom_variables":{},"edit_url":"https:\/\/www.surveymonkey.com\/r\/?sm=TXl35l8vDmkZFb3K8hTFlZKqm8kh_2B66LD5a2ra8TMz0oHCJPjS2f5qT89wWUzLiX","analyze_url":"https:\/\/www.surveymonkey.com\/analyze\/browse\/Kz2hnuWhgLTs3IYoZmR7cKWrg_2Fkj1rl_2ByY6cpi_2FIo9s_3D?respondent_id=11532660507","total_time":0,"date_modified":"2020-04-23T20:39:06+00:00","date_created":"2020-04-23T20:39:06+00:00","href":"https:\/\/api.surveymonkey.com\/v3\/collectors\/258911010\/responses\/11532660507","pages":[{"id":"121199368","questions":[{"id":"456667008","answers":[{"tag_data":[],"text":"monkey test feedback message"}]}]}]}%

Upon a successful POST, I can see the response from the survey dashboard as well as an email notification that was received from Survey Monkey to my account email notifying a new response.

image.png (424×914 px, 419 KB)


Qualtrics

Summary

We can use the following API endpoint to create a response to a survey:

https://api.qualtrics.com/reference#createresponse

curl --request POST \
  --url https://<yourdatacenterid>.qualtrics.com/API/v3/surveys/<surveyId>/responses \
  --header 'accept: application/json' \
  --header 'content-type: application/json'

We must provide:

  • auth token
  • data center ID
  • survey ID
  • feedback message

Investigation

I found the Qualtrics documentaion to be effcient and in very good shape for what I was looking for. I created a free account with my work email and started playing with it, only to find out then that it’s not actually possibly to test the API with a free account because the auth token is not provided automatically to free accounts:

https://www.qualtrics.com/support/survey-platform/managing-your-account/trial-accounts/

Due to this purpose, there are limitations on the free account, including:

  • Can only create surveys under CoreXM
  • Only 1 active survey at any given time

...

  • No extra features (Offline App, SMS, API, Stats iQ, etc.)

However, I was pleasantly surprised to how Qualtrics toolset seemed to be all in order and the documentation very useful. The endpoint seems to be very similar to what Survey Monkey offers, and it actually seems even simpler because less IDs are needed for the POST request. Even though I wasn’t able to actually test the API myself because of the free account restriction, I can confirm that:

Note that:

https://www.qualtrics.com/support/integrations/api-integration/using-qualtrics-api-documentation/

The API Reference page contains a “Try It” function that allows you to quickly and easily test an API request (note that most API requests require Qualtrics IDs). Let’s demonstrate the wizard by using our example API request List Surveys. Below is how you’ll test your API call...

But indeed when I attempted to try this feature I can see the API token is needed for that as well:

image.png (692×546 px, 319 KB)


Google Forms

Summary

Google’s offering is optimized to be used within the scope of Google App Scripts, which is not quite what we need for a our feedback component. However I did find one more hacky way we could use Google Forms.

Investigation

What I gather and understand regarding Google App Scripts is that’s where the API functionality lies, but they are packaged differently. Not an actual endpoint we can hit, at least not easily, all the documentation I find seems to have been optimized for using Google App Scripts in their more native way, which is within Google products. Google Forms, Google Sheets, Google Docs and the other Google products, for example, all have a Script Editor where one can program functions from within the app. Which is pretty cool, but not quite useful for our case.

Trying to explore further I end up with more questions than answers. Is there a way to expose the direct endpoint with more advanced settings? I wasn’t able to. It seems I’m not the only one:

https://stackoverflow.com/questions/8604992/google-form-api
https://issuetracker.google.com/issues/36754753

One hacky way

One resource I did stumble upon goes over an approach that takes advantage of a combination of URLs and IDs grabbed from the “Inspect Element” view of the Google Form survey itself. Rather than explaining it in detail myself, instead:

I was able to get some promising results this way, but it’s currently not working as needed the following results after revisiting this approach:

  • Upon sending POST request, I can see directly from the Google Form responses page the responses being received along with text message
  • I can see the responses also in a Google Sheet with timestamps included (using a feature that Google Form itself offers)

Screen Shot 2020-05-01 at 4.37.06 PM.png (2,784×1,778 px, 850 KB)

Screen Shot 2020-05-01 at 4.31.34 PM.png (2,784×1,778 px, 704 KB)


A note on pricing and final thoughts

It’s unknown to me right now whether here in Wikimedia we already have licenses for Survey Monkey and Qualtrics services, and I’m assuming because we already use Google we have access to their offering on Google App Scripts. That being said, this is what I see regarding pricing.

  • Survey Monkey has a public page listing the different pricing:

https://www.surveymonkey.com/pricing/

image.png (1,056×640 px, 651 KB)

  • Qualtrics doesn’t seem to have a page open to public that lists pricing. Because I created an account during my test, I’m able to see this page below. And from that screenshot you can see that even if you have an account, the pricing for CoreXM Professional or CoreXM Advanced have no stated price but instead a direction to contact their sales team.

image.png (1,186×758 px, 887 KB)

All in all, it seems Survey Monkey might be the easiest path to move forward. My intention here is to help visualize cons and pros of each option, open up a conversation, and have us reach a decision as a team. Happy to address any follow up questions or provide more info/screenshots/context anywhere.

Given the task in T236317: Allow users to provide feedback from within the app, we only want to receive the feedback in String, which means only one field. Therefore, there isn't a need for a summary of feedback or voting or rating. Google Forms should be enough if we free to use it without against WMF policy.

However, if we decide to use the same tool for the "rate the app" or voting feature in the future, then Survey Monkey and Qualtrics have more advantages with the UI and support.

It’s unknown to me right now whether here in Wikimedia we already have licenses for Survey Monkey and Qualtrics services, and I’m assuming because we already use Google we have access to their offering on Google App Scripts.

I'm assuming that using the Google App Scripts is the fastest option given that the early stage of the first launch without paying for the service unless we receive a lot of feedback in a short time; For the Survey Monkey and Qualtrics, I won't be taking them If take time to apply for a paid license under the WMF name when using the service.

An update here: I revisited the Google Form approach explored in branch T249620-spike-google-test and I was now able to get the responses text to display on Google Forms page. In this approach we can see responses both in Google Form or Google Sheets

Screen Shot 2020-05-01 at 4.37.06 PM.png (2,784×1,778 px, 850 KB)

Screen Shot 2020-05-01 at 4.31.34 PM.png (2,784×1,778 px, 704 KB)

I have updated the my report comment to include this.

Thanks @eamedina for the thorough investigation. Unfortunately none of those options meet our privacy standards so we're looking at internal solutions.