Amplitude supports object arrays as event properties as described here
that combined with property splitting seems powerful. However I’m unclear when it’s best to use this vs a flat list of properties. Is it strictly when you need to represent multiple objects and thus would have repeating of properties forcing you to come up with creative naming to avoid collisions?
in our case, say you only even have one subscription plan in a purchase. Each plan say has a name, term length and price. Also given customers can change plans, we’d want to know the previous plan they are coming from.
is it just better to model event properties like:
Event: Plan Purchased
- plan_name: silver
- plan_price: 19.99
- plan_months: 1
- plan_name_previous: gold
or is it better to do:
Event: Plan Purchased
- plan: { [ name: “silver”, price: 19.99, months: 1 ] }
- plan_name_previous: gold
I assume the first way is best because it’s less complex and the object array is unnecessary since there’s only ever one plan purchased.
I was surprised not to find more specific advice in the help center. So hoping someone here has advice.