We are asking our users multi-select questions and we want to report on the distribution of the answers. I am wondering how to structure the data for the easiest reporting.
Ex.:
Question = “What brings you to our Product?” Answers: A, B, C, D, E, F, G… which is multi-select (can be 0 to N answers).
Should this be one event with an array property containing all the answers of the user? If so, how do I create the distribution chart?
Should this be a user property as an array? If so, same - how do I report on distribution?
Should these be different events (one for each answer)? Reporting would be simple, but it feels inefficient to me.
Anyone can help with this?
Page 1 / 1
Couple of options jump to mind @Zeus Collected. I’ll assume you’re passing an event along the lines of ‘survey answered’ (or whatever you call it) when the user submits their answer.
Option 1 - Use an object array passed with ‘survey answered’ then split it in Amplitude Data
For example…
'answers':> { 'A': 'yes', 'B': 'no', 'C': 'yes',
...
'N': 'no'
} ]
...yes/ no representing whether the given checkbox was selected. You’ll have ‘answers’ as an event property in Amplitude then, but given it’s an object array you can split it in Amplitude data (https://help.amplitude.com/hc/en-us/articles/9623000954907-Cart-analysis-Use-object-arrays-to-drive-behavioral-insights#h_01GGX3KMYSJX6EBW6WHRC7PEMH) which would yield a further N event properties (one for each answer option). If you’ve got more than one question passed in a single ‘survey answered’ event you can still use this; each element of the array then passes answers for each individual question, and you can add a variable where the value identifies the question (‘question’: ‘question 1’, ‘question’: ‘question 2’, etc).
Option 2 - Use a single string and split that
For example, you could pass this event property (I’ve gone with a pipe delimiter, but that’s up to you)…
Again this can be modified if you’ve more than one question in the event, for example…
'answers': 'q1_A_yes|q1_B_no|C_yes|...|qN_N_no'
Which one to use? Up to you really….could be argued that Option 1 is more straightforward for engineers to set up in your website/ application (?!) , while Option 2 only uses 2 event properties rather than N+1 and is arguably more user friendly for your end users in Amplitude as the distribution chart is then pretty simple. I’d personally go Option 2, but as I say, it could be different for you. There could also be other solutions too, these are just the 2 that came to mind immediately.
Hope that helps!
It was even easier than I was expecting… we tried passing all selected values in an array property and this works perfectly.
Ex.: user selects A,D,F options. We pass the event with the property tA,D,F].
The segmentation chart automatically shows the distribution of options.
User segmentation can use a specific value of the array.
So basically, everything was supported by Amplitude without custom/derived event/properties.
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.