Collecting IDFA to retarget or analyse impact of advertising campaign

Every iOS device comes with an identifier. With the release of iOS6, the Unique Device Identifier (UDID) has been replaced with the Identifier for Advertising (IDFA). The IDFA (Learn more in the iOS Developer Library) allows developers and marketers to track activity for advertising purposes. Many ad Exchange allow passing the IDFA for mobile application bid requests.

For Android devices use Google Advertising ID, which provides the same type of device-specific, unique, resettable ID for advertising as the IDFA.

The IDFA may be used by advertisers to run remarketing campaigns and record “conversions” (purchasing or downloading). The IDFA has two key features:
- IDFA can be reset by the user at any time. - Users can opt out of all remarketing by enabling a device setting called "Limit Ad Tracking" (LAT), which restricts advertisers from using the IDFA for behavioral advertising.

Integrating the IDFA in the "individual" user statistics of triggering/ advertising can enable brands (of course required to respect option/optout and LAT settings" to retarget users that have come in proximity of a given beacon or to measure impact of advertising looking at foot-path increase of a subset of users which have received advertisement and that hold an app which listen to specific i-beacons. Collecting this type of statistics can allow to measure conversion funnels from on-line to in-store presence.
Collecting this sort of data is very easy with the Ubudu SDK. It only requires when initialising the SDK to store the IDFA as an external-id or property of the user.
For instance in IOS/ Swift you would do the following :

//add AdSupport for optional profiling step
import AdSupport
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UbuduSDKDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.
    var ubuduSDK = UbuduSDK.sharedInstance() as UbuduSDK
    let namespace : NSString = "634b207ee2f313c109c58675b44324ac2d41e61e"
    ubuduSDK.appNamespace=namespace

    //Optional profiling step: if user as enabled advertising, we add the idfa as the external id of the user
    //in order to  allow cross-application advertsing targeting. The id used by the hosting application could be used as well
    //We could also add tags which can be used to target interactions;
    var idfa_mgr = ASIdentifierManager.sharedManager() as ASIdentifierManager
    var idfa_s : NSString?
    if idfa_mgr.advertisingTrackingEnabled {
        var idfa = idfa_mgr.advertisingIdentifier as NSUUID
        idfa_s = idfa.UUIDString
    }
    ubuduSDK.user = UbuduUser(ID: idfa_s, withProperties: nil, tags: nil)
    //end of optional profiling step

    ubuduSDK.delegate = self
    var error: NSError?
    ubuduSDK.start(&error)
    if error != nil {
        println("Error in starting the Ubudu SDK")
    }
    return true
}

func application(application: UIApplication!, didReceiveLocalNotification notification: UILocalNotification!) {
    // let it handle by default by the Ubudu SDK
    UbuduSDK.sharedInstance().executeLocalNotificationActions(notification)

}



... }
To check that this has been successfully initiated go in your application log console : /applications/id/view_logs
and you see "new user" and "returning user" logs with the IDFA:
2014-10-04 09:56:55 UTC returning user {"event":"user","date":"2014-10-04 09:56:55 UTC","u_app_user":{"properties":{"ext_id":"1AC73AF8-CCAD-433E-9236-FE91307111DC","u_devices":["iPhone Simulator","iOS 8.0"]},"u_application_uid":"fe6c60982a628d79b3c55c57538c16819c95269f","udid":"0B1ED5B2-F5A5-49B9-AB97-D73542199AEA"}}
Then you can retrieve the logs statistics for users using the server REST API
cf. http://docs.ubudu.apiary.io