To be discussed: How should the result look like into matomo, how can we implement this in a matomo-conformant way (e.g. rendering the form multiple times instead of making it dynamic)
Matomo needs a fixed form ID in order to make Form Analytics work. The first two components (address type options) are outside of the forms. Depending on the user's choice in these form field groups the respective address form is displayed. The different forms for postal address (both private and company) and e-mail address need to be duplicated and shown/hidden as needed.
- For each address type there is a unique form.
- The form ID is laika-donation-personal-data suffixed by either -private, -company or -email.
- Matomo's form analytics tracks the submit event of all forms.
- We should use v-show and not v-if to hide/show forms.
- Currently used v-ifs should be removed.
- Address types may need refactoring: put another value for pre-address-type (think of a better name) into the store.
- To track form submissions correctly, you must
- Put the SubmitValues component in each form
- Call trackFormSubmission when submitting the form
- You may put the submit button for all forms in a separate form. But you can also omit the <form> tag for the summary and button section of the form