Search Ads Attribution API enables iOS developers
to track and attribute app downloads that originate from Search Ads campaigns.
With Search Ads Attribution API,
developers have the ability to accurately measure the lifetime value
of newly acquired users and the effectiveness of their advertising campaigns.
↓
検索広告アトリビューションAPIを使用すると、
iOS開発者は検索広告キャンペーンから発生したアプリのダウンロードを追跡および属性設定できます。
Search Ads Attribution APIを使用すると、
開発者は新しく獲得したユーザーの生涯価値と広告キャンペーンの効果を正確に測定できます。
Key Benefits
• Easily measure effectiveness of your Search Ads campaigns.
• Enable your app for attribution at any time and begin tracking app downloads from your existing Search Ads campaigns.
• Access information about the ad that resulted in a tap and download within 30 days.
For Example: campaign name and ID, ad group name and ID, keyword, and tap and download dates.
• Since the data is returned as an NSDictionary object,
pass the entire data object to your server; your app will not
need to be updated even if the data structure returned by Search Ads changes.
↓
•検索広告キャンペーンの効果を簡単に測定できます。
•アプリのアトリビューションをいつでも有効にして、既存のSearch Adsキャンペーンからのアプリのダウンロードの追跡を開始する。
•タップが発生した広告に関する情報にアクセスし、30日以内にダウンロードする。 例:キャンペーン名
ID、広告グループ名、ID、キーワード、タップ日とダウンロード日。
•データはNSDictionaryオブジェクトとして返されるため、データオブジェクト全体をサーバーに渡します。
あなたのアプリはそうしません
Search Adsから返されたデータ構造が変更された場合でも更新する必要があります。
Implementation
To enable your app for Search Ads Attribution, follow these steps:
1. iAd framework: Add the iAd framework to the Xcode project for your app.
2. iAd headers: Import the iAd headers in the file containing your attribution code.
3. Search Ads attribution: In your app, check for Search Ads attribution.
4. Error handling: Handle errors and recheck if required.
5. "Phone Home”: “Phone home” and send the downloaded data to your server.
↓
アプリをSearch Ads Attribution用に有効にするには、次の手順に従います。
1. iAdフレームワーク:あなたのアプリケーションのXcodeプロジェクトにiAdフレームワークを追加します。
2. iAdヘッダ:あなたのアトリビューションコードを含むファイルにiAdヘッダをインポートします。
3.検索広告属性:アプリで、検索広告属性を確認します。
4.エラー処理:エラーを処理し、必要に応じて再確認します。
5.「Phone Home」:「Phone home」をクリックして、ダウンロードしたデータをサーバーに送信します。
Requirements
To enable your app for Search Ads Attribution, follow these steps:
• This feature is available in all Search Ads-supported storefronts.
• For developers running Search Ads campaigns.
• To track attribution, the app must be compiled with the appropriate headers (available in Xcode for iOS 10.0 or later).
• App download data is available for at least the past 12 months for users running iOS 10.0 or later.
↓
アプリをSearch Ads Attribution用に有効にするには、次の手順に従います。
•この機能は、Search Adsがサポートするすべての店舗で利用できます。
•検索広告キャンペーンを実行している開発者向け。
•帰属を追跡するには、適切なヘッダー(iOS 10.0以降のXcodeで使用可能)を使用してアプリをコンパイルする必要があります。
•iOS 10.0以降を実行しているユーザーの場合、アプリダウンロードデータは少なくとも過去12か月間利用できます。
iAd framework
The iAd framework is bundled with Xcode. Follow these steps to add the iAd framework to the Xcode project file for your app:
1. Go to your target view and select General.
2. Scroll down to a section called Linked Frameworks and Libraries and click the plus (+) icon.
3. In the dropdown menu, search for iAd.
4. Select iAd.framework and click the Add button.
↓
iAdフレームワークはXcodeにバンドルされています。 アプリのXcodeプロジェクトファイルにiAdフレームワークを追加するには、次の手順に従います。
1.ターゲットビューに移動して[一般]を選択します。
2. Linked Frameworks and Librariesというセクションまでスクロールして、プラス(+)アイコンをクリックします。
3.ドロップダウンメニューで、iAdを検索します。
4. [iAd.framework]を選択して[追加]ボタンをクリックします。
iAd headers
Import the iAd headers into your app, typically in the file containing your attribution code.
This header file is dependent on the iOS version for which you compile your app in Xcode.
Search Ads Attribution requires iOS 10.0 or later.
↓
通常はアトリビューションコードを含むファイルで、iAdヘッダーをアプリにインポートします。
このヘッダファイルは、XcodeでアプリをコンパイルしたiOSのバージョンに依存します。
Search Ads AttributionにはiOS 10.0以降が必要です。
Search Ads attribution
In your app, check for Search Ads attribution once,
such as at first open or when registration is complete.
Store the data locally so that you do not need to call again.
アプリで、初回オープン時や登録完了時など、Search Adsの帰属を1回確認します。
電話をかけ直す必要がないように、データをローカルに保存してください。
# import <iAd/iAd.h> /*!
* @method requestAttributionDetailsWithBlock: *
* @param completionHandler
* A block which will be called with details related to the attribution status of the app.
* The attributionDetails dictionary will contain click and download dates
* as well as other specific campaign related information provided by Search Ads. If the attributionDetails
* dictionary is nil, an NSError is passed with an ADClientError enum. *
* The handler will be called on an arbitrary queue. *
* @discussion
* Provides a way for an app to determine when an ad was shown to the user
* which resulted in the user’s download of the app.
*/
- (void)requestAttributionDetailsWithBlock:(void (^)(NSDictionary *attributionDetails, NSError *error))
completionHandler NS_AVAILABLE_IOS(9_0);
↓
import iAd
/*!
* @method requestAttributionDetailsWithBlock: *
* @param completionHandler
* A block which will be called with details related to the attribution status of the app.
* The attributionDetails dictionary will contain click and download dates
* as well as other specific campaign related information provided by Search Ads. If the attributionDetails
* dictionary is nil, an NSError is passed with an ADClientError enum. *
* The handler will be called on an arbitrary queue. *
* @discussion
* Provides a way for an app to determine when an ad was shown to the user
* which resulted in the user’s download of the app.
*/
func requestAttributionDetails(_ completionHandler: @escaping ([String : NSObject]?, Error?) -> Void) {
}
アプリの帰属ステータスに関連する詳細と呼ばれるブロック。
AttributionDetails辞書には、クリックとダウンロードの日付が含まれます。
Search Adsが提供するその他の特定のキャンペーン関連情報。 AttributionDetailsの場合 dictionaryはnil、NSErrorはADClientError enumとともに渡されます。
ハンドラは任意のキューで呼び出されます。
@discussion
広告がいつユーザーに表示されたかをアプリが判断する方法を提供します。
ユーザーがアプリをダウンロードしたことになります。
Error handling
Handle any errors you receive and re-poll for data, if required. Use ADClientErrorDomain to capture returned errors.
In the Search Ads Attribution API, there are two error values, ADClientErrorUnknown and ADClientErrorLimitAdTracking. If you receive ADClientErrorUnknown, wait a few seconds and try again. When you have successfully retrieved your attribution data, you will not need to poll for data again; the values you have retrieved will not change.
If you receive ADClientErrorLimitAdTracking, it means the user has turned on Limit Ad Tracking on their iOS device. No data will be available about this user’s ad taps and conversions.
↓
受信したエラーを処理し、必要に応じてデータを再ポーリングします。 返されたエラーをキャプチャするには、ADClientErrorDomainを使用します。
Search Ads Attribution APIには、ADClientErrorUnknownとADClientErrorLimitAdTrackingの2つのエラー値があります。 ADClientErrorUnknownを受け取った場合は、数秒待ってからやり直してください。
アトリビューションデータを正常に取得したら、データを再度ポーリングする必要はありません。 取得した値は変わりません。
あなたがADClientErrorLimitAdTrackingを受け取った場合、それはユーザーが彼らのiOSデバイスでLimit Ad Trackingをオンにしたことを意味します。
このユーザーの広告タップとコンバージョンに関するデータはありません。
"Phone Home”
Send the downloaded data to your server.
When your app has retrieved the NSDictionary object (in the sample below the object is attributionDetails), you can upload the data to your servers,
with any user registration data you want, and using any method of your choice.
↓
ダウンロードしたデータをサーバーに送信してください。 アプリケーションがNSDictionaryオブジェクトを取得したら(下のサンプルではAttributionDetails)、データをサーバーにアップロードし、必要なユーザー登録データを任意の方法で使用できます。
/*!
* @const ADClientErrorDomain *
* @discussion
* Error domain for NSErrors passed to the completionHandler as a
* result of calling: *
* • -[[ADClient SharedClient] requestAttributionDetailsWithBlock] *
*/
extern NSString * const ADClientErrorDomain;
/*!
* @enum ADClientError *
* @const ADClientErrorUnknown
* General errors that aren’t covered by one of the more specific error reasons.
* This is generally related to connectivity issues. *
* @const ADClientErrorLimitAdTracking
* The device has Limit Ad Tracking enabled. It will not be possible to receive
* attribution details for app purchases made on this device. *
* @discussion
* Error codes for NSErrors passed to the completionHandler block
* when calling the requestAttributionDetailsWithBlock method.
*/
typedef NS_ENUM(NSInteger, ADClientError) {
ADClientErrorUnknown = 0,
ADClientErrorLimitAdTracking = 1,
};
// Call the iOS10 attribution API
[[ADClient sharedClient] requestAttributionDetailsWithBlock: ^(NSDictionary *attributionDetails, NSError *error) {
if(!error) {
// Send the attributionDetails dictionary to your server for further processing.
return;
}
if(error.code == ADClientErrorLimitAdTracking) {
// The device has limit ad tracking enabled. It will not be possible to retrieve attribution details.
return;
}
// For any other errors, you may schedule a time to call the API again,
// later in this session or the next time the app is launched.
}];
let ADClientErrorDomain = ""
enum ADClientError : Int {
case unknown = 0
case limitAdTracking = 1
}
// Call the iOS10 attribution API
ADClient.shared().requestAttributionDetails({ attributionDetails, error in
if error == nil {
// Send the attributionDetails dictionary to your server for further processing.
return
}
if (error as NSError?)?.code == ADClientError.limitAdTracking.rawValue {
// The device has limit ad tracking enabled. It will not be possible to retrieve attribution details.
return
}
// For any other errors, you may schedule a time to call the API again,
// later in this session or the next time the app is launched.
})
/ *!
* @const ADClientErrorDomain *
* @討論
* NSErrorsのエラードメインはcompletionHandlerに
*呼び出しの結果:*
*• - [[ADClient SharedClient] requestAttributionDetailsWithBlock] *
* /
extern NSString * const ADClientErrorDomain;
/ *!
* @enum ADClientError *
* @const ADClientErrorUnknown
*より具体的なエラーの理由の1つによってカバーされていない一般的なエラー。
*これは一般に接続性の問題に関連しています。 *
* @const ADClientErrorLimitAdTracking
*デバイスで広告トラッキングの制限が有効になっています。 受け取ることはできません
*このデバイスで行われたアプリの購入に関する帰属の詳細。 *
* @討論
* completionHandlerブロックに渡されるNSErrorsのエラーコード
* requestAttributionDetailsWithBlockメソッドを呼び出すとき。
* /
Returned Values
This table shows the data dictionary keys and data types returned by the Search Ads Attribution API.
↓
この表は、Search Ads Attribution APIによって返されるデータディクショナリキーとデータ型を示しています。
iad-attribution
True if user clicked on a Search Ads impression within 30 days prior to app download.
↓
ユーザーがアプリのダウンロード前30日以内にSearch Adsインプレッションをクリックした場合はTrueです。
iad-click-date
Date and time the user clicked on a corresponding ad
↓
ユーザーが対応する広告をクリックした日時
iad-conversion-date
ユーザーが検索広告をクリックした後にアプリをダウンロードした日時。
iad-conversion-type
ConversionType identifies a conversion as a new download or a redownload. A redownload is a download of an app a user had previously deleted from their device. Or, a download of the same app by a user on an additional device. iad-conversion-date represents their latest download via a Search Ad.
↓
ConversionTypeは、変換を新規ダウンロードまたは再ダウンロードとして識別します。
再ダウンロードは、ユーザーが以前に自分のデバイスから削除したアプリのダウンロードです。または、追加のデバイス上のユーザーによる同じアプリのダウンロード。
iad-conversion-dateは検索広告による最新のダウンロードを表します。
iad-keyword-matchtype
Sample Returned Data
This sample code shows the structure that you can expect to receive when you call requestAttributionDetailsWithBlock.
↓
このサンプルコードは、requestAttributionDetailsWithBlockを呼び出したときに受け取ることができる構造を示しています。