The Velocidi iOS SDK is open-source and can be found at github.com/velocidi/velocidi-ios-objc-sdk.
To integrate VelocidiSDK into your Xcode project using CocoaPods, specify it in your
To integrate VelocidiSDK into your Xcode project using Carthage, specify it in your
carthage to build the framework and drag the built VelocidiSDK.framework into your Xcode project.
VelocidiSDK should work with any version of iOS equal or bigger than 10.0.
Initialize the VelocidiSDK with the necessary
trackingBaseUrl and the
matchBaseUrl URLs. Without this, VelocidiSDK will not work. We suggest doing this when the application launches.
A tracking event will log a user action in Velocidi's CDP.
In order to send a tracking event, create a JSON string representation of the event type you wish to send (or a equivalent
NSDictionary representation) and call the
Please refer to https://docs.velocidi.com/collect/events to discover which event types and schemas are supported.
You can also pass callback blocks that will be called when the request either succeeds or fails.
Match requests are used to link multiple identifiers in Velocidi's CDP. This way, any action made with any of the identifiers, across multiple channels (Browser, Mobile App, ...), can be associated to the same user.
In VelocidiSDK, a match request will link together all the provided user IDs:
In iOS 14, Apple changed their privacy guidelines and APIs. We recommend reading Apple's instructions on User Privacy and Data Use.
Due to those changes, VelocidiSDK no longer uses the IDFA by default and instead requires the developer to explicitly define an ID to identify the user. It is up to the developer to choose which user IDs to use, taking in consideration that the ID type should be supported by the CDP system. Refer to our list of supported IDs.
You can use any ID in our list of supported IDs with VSDKUserId, as exemplified in Make a Match and Send a tracking event. If you would like to use an ID not present in our list of supported IDs, please contact our support so that we can add it.
The Identifier for Vendor (IDFV) is an ID that is shared amongst apps from the same vendor in the same device. It allows a vendor to uniquely identify a user's device, without relying on the device-wide IDFA, and its respective limitations. Per Apple's guidelines "The IDFV may not be combined with other data to track a user across apps and websites owned by other companies unless you have been granted permission to track by the user".
If you are using the Identifier for Advertisers (IDFA) to identify the user, please make sure to read Apple's instructions on User Privacy and Data Use and be sure that your use case is compliant with Apple's guidelines.
The following examples should provide a general approach on retrieving the IDFA, but we recommend reading Apple's documentation on how to use the App Tracking Transparency framework.
Using the IDFA requires explicit authorization from the user for each application. To do so, start by establishing the message that will be presented to the user in the permission dialog. This can be done by adding the NSUserTrackingUsageDescription key to the Info.plist file of the application. The value of this key will be the message presented.
Before starting to send events, we have to request access to the IDFA, and only if that permission is granted, can we send events with the IDFA. If the user has not given permission yet, this might show the permission dialog box with the message previously set.
Once we established a method of requesting permission for using the IDFA, we just have to call it and provide a completion handler where we are creating the event.