Information gathering
To trigger data collection and submission, you must call the collectData method. In addition to capturing device information, the method aims to map the customer journey within the application. For this reason, the method also accepts the eventId and eventType fields. Another important point is that the method sends the information to QI Tech’s server via an asynchronous HTTP request, and therefore the success or error notification for the request is handled through Completion Handlers. The method has the following parameters:
| name | type | description |
|---|---|---|
| documentNumber | String | The user’s document number, if available. (CPF/CNPJ without dots, dashes, and slash) |
| eventId | String | An identifier of the event being reported |
| eventType | String | An enum that defines the type of event being reported (Example: 'login') — Take care to ensure that very similar events are reported with the same enum, so that intelligence can be built on top of this data |
| onSuccessHandler | func() ‑> Void | Function that will be called if the data is successfully sent to QI Tech’s server required |
| onErrorHandler | func() ‑> Void | Function that will be called if there is an error sending the data to QI Tech’s server required |