The Gini Pay Bank SDK Library has the ability to track user events. In order to receive the events, import
GiniCapture and implement the
GiniCaptureTrackingDelegate protocol and supply the delegate when initializing
GiniPayBank. For example:
let viewController = GiniPayBank.viewController(withClient: client, importedDocuments: captureDocuments, configuration: giniPayBankConfiguration, resultsDelegate: self, documentMetadata: documentMetadata, trackingDelegate: trackingDelegate) // Or when not using the default network: let viewController = GiniPayBank.viewController(withDelegate: self, withConfiguration: giniPayBankConfiguration, importedDocument: nil, trackingDelegate: trackingDelegate)
Event types are partitioned into different domains according to the screens that they appear at. Each domain has a number of event types. Some events may supply additional data in a dictionary. Certain events pertaining to transitions between screens are only reported in the Screen API.
|Domain||Event type||Additional info keys||Comment||Introduced in||Screen API||Compoment API|
||User completed onboarding||1.0.0||✅||✅|
||User closed the camera screen||1.0.0||✅||❌|
||User tapped “Help” on the camera screen||1.0.0||✅||❌|
||User took a picture||1.0.0||✅||✅|
||User went back from the review screen||1.0.0||✅||❌|
||User advanced from the review screen||1.0.0||✅||❌|
||User canceled the process during analysis||1.0.0||✅||❌|
||The analysis ended with an error. The error message is supplied under the “message” key.||1.0.0||✅||✅|
||The user decided to retry after an analysis error.||1.0.0||✅||✅|
If you are using the Component API, you may want to implement the remaining events in your coordinator code. In order to report an event, call the
GiniCaptureTrackingDelegate method relating to the event’s domain area and pass the event.
For instance to report user advancing from the Review Screen, call
onReviewScreenEvent(event:) passing an
ReviewScreenEventType defines the event types available in the Review Screen domain.
The call would look something like this:
trackingDelegate?.onReviewScreenEvent(event: Event(type: .next))