Latest 3.0.0
Homepage https://github.com/segmentio/analytics-ios-iads-attribution
License MIT
Platforms ios 9.0
Dependencies Analytics
Authors

Version
License
Platform

Records iAd attribution information using analytics-ios.

When it is able to retrieve iAd information, it will augment all track events. The attribution information is transformed to Segment context this way:

[analytics track:@"Application Installed",
    @"context" : @{
      @"campaign" : @{
        @"provider" : @"Apple",
        @"click_date" : attributionInfo[@"iad-click-date"],
        @"conversion_date" : attributionInfo[@"iad-conversion-date"],
        @"source" : @"iAd",
        @"name" : attributionInfo[@"iad-campaign-name"],
        @"content" : attributionInfo[@"iad-keyword"],
        @"ad_creative" : attributionInfo[@"iad-org-name"],
        @"ad_group" : attributionInfo[@"iad-adgroup-name"],
        @"id" : attributionInfo[@"iad-campaign-id"],
        @"ad_group_id" : attributionInfo[@"iad-adgroup-id"]
      }    
    }
}];

Because this information in passed through the context object, this will not be received by other downstream integrations, unless explicitly mapped. Kochava is currently the only integration which supports Apple Search Ads.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Analytics-iAds-Attribution is available through CocoaPods. This pod requires version 3.6.0 or higher of the Analytics pod. To install it, simply add the following line to your Podfile:

pod "Analytics"
pod "Analytics-iAds-Attribution"
#import <Analytics-iAds-Attribution/SEGADTracker.h>

// Initialize the configuration as you would normally.
SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
...

// Configure the client with the iAD middleware to attach iAd properties.
configuration.middlewares = @[ [SEGADTracker middleware] ];

[SEGAnalytics setupWithConfiguration:configuration];

Author

Segment.io, Inc., [email protected]

License

Analytics-iAds-Attribution is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Analytics-iAds-Attribution",
    "version": "3.0.0",
    "summary": "Measure iAds attribution data with analytics-ios.",
    "description": "Analytics-iAds-Attribution requests iAd attribution information and sends a track event with this information.",
    "homepage": "https://github.com/segmentio/analytics-ios-iads-attribution",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "f2prateek": "[email protected]"
    },
    "source": {
        "git": "https://github.com/segmentio/analytics-ios-iads-attribution.git",
        "tag": "3.0.0"
    },
    "social_media_url": "https://twitter.com/SegmentEng",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Analytics-iAds-Attribution/Classes/**/*",
    "dependencies": {
        "Analytics": [
            "~> 3.6.0"
        ]
    }
}

Pin It on Pinterest

Share This