# Instrumentation

For proper tracking of the verification funnel via Truecaller SDK on your app, we recommend you to implement tracking events for the following states :

**When you are using the SDK for verification of Truecaller users only ( 1-tap Verification without OTP ) :**

1. Total users coming to your verification flow
2. Number of cases when the Truecaller app is present on your smartphone
3. Number of profile verification requests made by your app ( when *TruecallerSDK.getInstance().getUserProfile() method is invoked* )
4. Number of users who proceed with this flow and click Continue on the Truecaller dialog \[ for these cases, you receive a success callback with TrueProfile response in *onSuccessProfileShared()* callback method ]
5. Number of cases where you received any error, where you receive an error callback with TrueError response in *onFailureProfileShared()* callback method. For details on specific error codes, please refer [here](https://truecaller4developers.gitbook.io/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app/handling-error-scenarios).

**When you are using the SDK for verification of non-Truecaller users also ( via drop call / fallback OTP ) :**

1. Total users coming to your verification flow
2. Number of cases when the Truecaller app is present on your smartphone and users get verified via the Truecaller 1-tap flow ( as described in the above section )
3. Number of verification requests made by your app for a non-Truecaller user ( when *TruecallerSDK.getInstance().requestVerification() method is invoked* )
4. Number of cases where the user is getting verified for the very first time on the current smartphone and you receive a success callback - *onRequestSuccess()* method ( Please refer [here](https://truecaller4developers.gitbook.io/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ) -
   1. &#x20;When the callback type you receive is either *VerificationCallback.TYPE\_MISSED\_CALL\_INITIATED* or *VerificationCallback.TYPE\_OTP\_INITIATED.* This implies that a drop call / SMS has been triggered to the user's mobile number.
   2. When the callback type you receive is either *VerificationCallback.TYPE\_MISSED\_CALL\_RECEIVED* or *VerificationCallback.TYPE\_OTP\_RECEIVED.* This implies that a drop call / SMS has been received on the user's mobile number on that smartphone. Please note that for getting the TYPE\_OTP\_RECEIVED callback, your app needs to have the Google SMS retriever hash code configured on Truecaller's developer portal ( while creating your partner key ) so that the SDK can auto read the incoming SMS and share the OTP with you in this particular callback method.
   3. Further to the above step, when you complete the user verification by invoking either *TruecallerSDK.getInstance().verifyOtp()* or *TruecallerSDK.getInstance().verifyMissedCall()* corresponding to the verification medium being used
   4. When the callback type you receive is either *VerificationCallback.TYPE\_VERIFICATION\_COMPLETE.* This implies that the verification in complete for the user
5. Number of cases where the user is already verified previously on the current smartphone and gets verified directly. In such cases, you receive the success callback - *onRequestSuccess()* method with callback type as *VerificationCallback.TYPE\_PROFILE\_VERIFIED\_BEFORE*
