The method “Assign Tracker ID” is used to manually assign a contact identifier (trackerId) to the SDK that was obtained from an external source outside the SDK itself. Before applying it, the SDK validates with the server that the given trackerId corresponds to an existing contact in your account, using the Connectif.assignTrackerId function.
How to Use It
The tracker assignment uses the trackerId parameter to validate and identify the corresponding contact in Connectif.
As a recommendation, this method should only be used when receiving a trackerId from a source external to the SDK session itself.
It is not recommended to use this method if the SDK has already identified a known contact.
• Tracker Info:
| Parameter | Description | Required | Considerations |
|---|---|---|---|
| trackerId | The contact identifier to assign | Yes | Must correspond to an existing contact in Connectif. If the sent trackerId does not exist, it cannot be assigned. |
Example
The tracker assignment will look like this.
Connectif.assignTrackerId("60f1b3b3b3b3b3b3b3b3b3b3")
Callbacks (Optional)
If you want to have feedback on possible errors when sending events, you can add an EventCallbacks when using our method.
EventCallbacks(
onSuccess: {
//Handling in case of success
},
onError: { error in
//Handling in case of error
})
Keep Learning!
To make the most out of your Connectif account, we recommend continuing with the following articles:
- Complete Guide to Integrate Connectif with Your Mobile App, to thoroughly understand all the changes in this integration.
- iOS SDK Get Started, to add Connectif Mobile SDK to your iOS project.
- Firebase Cloud Messaging Configuration, to enable push sending and receiving via the Android Mobile SDK.
- Apple Push Notifications Service Configuration, to enable push sending and receiving via the iOS Mobile SDK.