I have a user flow involving selection of 2 choices via a radio button, then form submission. Is it possible to record the choice as part of the submission event, and if so, what is the recommended method?
Yes, it is possible to record the choice as part of the submission event. The recommended method is to use Mixpanel's track_forms()
function, which is similar to mixpanel.track_links()
, but tracks form submissions. When a user makes a selection via a radio button and submits the form, you can capture the selected choice as a property of the form submission event. This allows you to analyze the user's choice in the context of the form submission.Here is the link to the full API documentation for more details: Mixpanel Javascript Full API ReferenceRemember to strike the right balance when defining your events. Events should neither be too broad nor too specific, and should be defined at the level of how you plan to analyse the user’s action or behavior. Use event properties to provide context or details about an event, instead of creating different events to capture similar actions. For example, instead of tracking multiple events Option 1 Selected
and Option 2 Selected
, track a Form Submitted
event with a Selected Option
property set to the value of the selected radio button.Here is the link to the best practices for defining events: Mixpanel Event Best Practices
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.