Skip to main content

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:

nametypedescription
documentNumberStringThe user’s document number, if available. (CPF/CNPJ without dots, dashes, and slash)
eventIdStringAn identifier of the event being reported
eventTypeStringAn 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
onSuccessHandlerfunc() ‑> VoidFunction that will be called if the data is successfully sent to QI Tech’s server required
onErrorHandlerfunc() ‑> VoidFunction that will be called if there is an error sending the data to QI Tech’s server required