### Standard Activation Callback Example (iOS) Source: https://support.appsflyer.com/hc/zh-cn/articles/207273946-AppsFlyer%E8%BF%BD%E8%B8%AA%E9%93%BE%E6%8E%A5%E4%B8%AD%E5%8F%AF%E4%BD%BF%E7%94%A8%E7%9A%84%E5%AE%8F-Available-Macros-on-AppsFlyer-s-Tracking-Links Presents an example of a standard activation callback URL for iOS devices. This URL contains parameters such as site ID, device IP, IDFA, and install time, which AppsFlyer utilizes for tracking app installs on iOS. ```http http://YourCompanyDomain.com?&site_id=(publisher_id)& device_ip=(ip)&;idfa=(idfa)&install_time=(install_unix_ts) ``` -------------------------------- ### Standard Activation Callback Example (Android) Source: https://support.appsflyer.com/hc/zh-cn/articles/207273946-AppsFlyer%E8%BF%BD%E8%B8%AA%E9%93%BE%E6%8E%A5%E4%B8%AD%E5%8F%AF%E4%BD%BF%E7%94%A8%E7%9A%84%E5%AE%8F-Available-Macros-on-AppsFlyer-s-Tracking-Links Provides an example of a standard activation callback URL for Android devices. This URL includes essential parameters like site ID, advertising ID, Android ID, and install time, used by AppsFlyer to track app installs. ```http http://YourCompanyDomain.com?site_id=(publisher_id) &advertising_id=(advertiser_id)&android_id=(android_id) &install_time=(install_unix_ts) ``` -------------------------------- ### Example GET Request with Advanced Privacy Parameters Source: https://support.appsflyer.com/hc/zh-cn/articles/360011316197-%E5%B9%BF%E5%91%8A%E5%B9%B3%E5%8F%B0%E7%9A%84%E9%AB%98%E7%BA%A7%E9%9A%90%E7%A7%81%E4%BF%9D%E6%8A%A4%E6%8C%87%E5%8D%97%E5%92%8C%E5%9B%9E%E4%BC%A0%E5%AE%8F This is a complete example of a GET request to the AppsFlyer attribution endpoint, including the necessary advanced privacy parameters ('af_ua', 'af_lang', 'af_ip') in the query string. Note that the user-agent is URL-encoded. ```http GET https://app.appsflyer.com/id123456789?pid=YOUR_NETWORK_ID&c={CampaignName}&af_c_id={CampaignID}&af_adset={adset name}&af_adset_id={adset ID}&af_ad={ad name}&af_ad_id={ad ID} &af_ad_type={Ad type}&af_siteid={PublisherId}&af_ua=Mozilla%2F5.0%20%28iPhone%3B%20CPU%20iPhone%20OS%2012_1_4%20like%20Mac%20OS%20X%29%20AppleWebKit%2F605.1.15%20%28KHTML%2C%20like%20Gecko%29%20Mobile%2F16D57&af_lang=en-US&af_ip=11.11.1.11 ``` -------------------------------- ### 系统属性:设置预装路径 (Bash) Source: https://support.appsflyer.com/hc/zh-cn/articles/207032166-%E5%9F%BA%E4%BA%8EManifest%E7%9A%84AppsFlyer%E5%87%BA%E5%8E%82%E9%A2%84%E8%A3%85%E5%BD%92%E5%9B%A0-%E5%AE%89%E5%8D%93 此代码片段展示了如何使用 ADB Shell 命令设置系统属性 `ro.appsflyer.preinstall.path`,以指向包含预装信息的 `pre_install.appsflyer` 文件。这需要 Root 权限。 ```Bash adb shell su setprop ro.appsflyer.preinstall.path /data/pre_install.appsflyer ``` -------------------------------- ### SKAN Postback Examples Source: https://support.appsflyer.com/hc/zh-cn/articles/360011502657-SKAdNetwork-integration-guide-for-ad-networks Examples of SKAdNetwork (SKAN) postbacks sent by AppsFlyer, for both installs and in-app events. ```APIDOC ## SKAN Postback Examples ### AppsFlyer SKAN Install Postback Example ```json { "postback_params": { "campaign_id": "12345", "ad_campaign_name": "Summer Sale", "ad_group_id": "67890", "ad_group_name": "AdGroup A", "ad_id": "ad111", "ad_name": "Banner Ad 1", "ad_set_id": "adset222", "ad_set_name": "AdSet X", "agency_id": "agency333", "agency_name": "Agency Z", "attribution_lookback_window": "30d", "browser_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1", "campaign_name": "Summer Sale Campaign", "click_time": "2023-10-27T10:00:00Z", "conversion_value": 5, "conversion_value_schema_id": "schema_v1", "conversion_value_update_time": "2023-10-27T10:30:00Z", "country_code": "US", "creative_id": "creative_xyz", "currency": "USD", "device_type": "iPhone", "fidelity_type": 1, "geo_subdivision1": "CA", "geo_subdivision2": "San Francisco", "idfa": "00000000-0000-0000-0000-000000000000", "idfv": "12345678-1234-1234-1234-1234567890AB", "install_time": "2023-10-27T11:00:00Z", "ip_address": "192.168.1.1", "locale": "en_US", "mac_address": "00:00:00:00:00:00", "mobile_country_code": 310, "mobile_network_code": 410, "postback_sequence_index": 0, "postback_time": "2023-10-27T11:05:00Z", "publisher_app_id": "1234567890", "publisher_app_name": "Example Publisher App", "redownload": false, "remote_ip_address": "203.0.113.1", "revenue": 1.99, "source_identifier": "12345", "source_domain": "example.com", "source_id": "source_abc", "source_name": "Example Source", "skadnetwork_version": "4.0", "site_id": "site_xyz", "store_kit_version": "2.0", "timestamp": 1698397200, "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1", "user_id": "user_123", "user_optout": false }, "app_id": "1234567890", "attribution_source": "skadnetwork", "bundle_id": "com.example.app" } ``` ### AppsFlyer SKAN In-App Event Postback Example ```json { "postback_params": { "campaign_id": "12345", "ad_campaign_name": "Summer Sale", "ad_group_id": "67890", "ad_group_name": "AdGroup A", "ad_id": "ad111", "ad_name": "Banner Ad 1", "ad_set_id": "adset222", "ad_set_name": "AdSet X", "agency_id": "agency333", "agency_name": "Agency Z", "attribution_lookback_window": "30d", "browser_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1", "campaign_name": "Summer Sale Campaign", "click_time": "2023-10-27T10:00:00Z", "conversion_value": 5, "conversion_value_schema_id": "schema_v1", "conversion_value_update_time": "2023-10-27T10:30:00Z", "country_code": "US", "creative_id": "creative_xyz", "currency": "USD", "device_type": "iPhone", "fidelity_type": 1, "geo_subdivision1": "CA", "geo_subdivision2": "San Francisco", "idfa": "00000000-0000-0000-0000-000000000000", "idfv": "12345678-1234-1234-1234-1234567890AB", "install_time": "2023-10-27T11:00:00Z", "ip_address": "192.168.1.1", "locale": "en_US", "mac_address": "00:00:00:00:00:00", "mobile_country_code": 310, "mobile_network_code": 410, "postback_sequence_index": 1, "postback_time": "2023-10-27T11:05:00Z", "publisher_app_id": "1234567890", "publisher_app_name": "Example Publisher App", "redownload": false, "remote_ip_address": "203.0.113.1", "revenue": 1.99, "source_identifier": "12345", "source_domain": "example.com", "source_id": "source_abc", "source_name": "Example Source", "skadnetwork_version": "4.0", "site_id": "site_xyz", "store_kit_version": "2.0", "timestamp": 1698397200, "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1", "user_id": "user_123", "user_optout": false, "event_name": "af_purchase", "event_id": "purchase_123", "event_time": "2023-10-27T11:15:00Z" }, "app_id": "1234567890", "attribution_source": "skadnetwork", "bundle_id": "com.example.app" } ``` ``` -------------------------------- ### Example pre_install.appsflyer File for Multiple Apps Source: https://support.appsflyer.com/hc/zh-cn/articles/207032166 This Bash snippet demonstrates the format of the pre_install.appsflyer file when multiple pre-installed applications need to be tracked on the same device. Each application and its corresponding media channel name should be on a separate line, using the format 'package_name=market_name'. ```bash com.appsflyer.tester=market_name com.newapp.newapp=market_name com.game.king=market_name ``` -------------------------------- ### 配置预装路径(系统属性) Source: https://support.appsflyer.com/hc/zh-cn/articles/207032166 通过Android系统属性设置预装应用的路径。需要设备生产商配合,并将 `pre_install.appsflyer` 文件放置在指定路径并设置权限。 ```bash adb shell su setprop ro.appsflyer.preinstall.path /data/pre_install.appsflyer ``` ```bash adb root adb remount adb pull /system/build.prop echo ro.appsflyer.preinstall.path=/data/pre_install.appsflyer >> build.prop adb push build.prop /system/build.prop adb shell chmod 644 /system/build.prop adb reboot ``` -------------------------------- ### Get Blocked Installs Report (API - Curl) Source: https://support.appsflyer.com/hc/zh-cn/articles/115004745523-%E5%AF%B9%E6%8E%A5%E6%B8%A0%E9%81%93%E7%9A%84Protect360%E6%8C%87%E5%8D%97 Retrieves a report of blocked installs identified by Protect360. This API call requires the application ID, a date range (from and to), and an authorization token. It can also include additional fields for more detailed information about the blocked installs. ```curl curl --location --request GET 'https://hq1.appsflyer.com/api/adnets-data/v1/export/blocked_installs_report/app/{app_id}?from={2020-07-10}&to={2020-07-20}&additional_fields=keyword_id,store_reinstall,deeplink_url,oaid,blocked_reason,blocked_reason_value,blocked_reason_rule,blocked_sub_reason,match_type,device_category,gp_referrer,gp_click_time,gp_install_begin,amazon_aid,keyword_match_type' \ -H 'Authorization: Bearer {V2.0 api token placeholder. Note: The token has more than 700 characters.}' ``` -------------------------------- ### Postback Examples Source: https://support.appsflyer.com/hc/zh-cn/articles/207273946 Provides example postback URLs for both Android and iOS activations. ```APIDOC ## Postback Examples ### General Activation Postback Examples #### Android ``` http://YourCompanyDomain.com?site_id=(publisher_id) &advertising_id=(advertiser_id)&android_id=(android_id) &install_time=(install_unix_ts) ``` #### iOS ``` http://YourCompanyDomain.com?&site_id=(publisher_id)& device_ip=(ip)&;idfa=(idfa)&install_time=(install_unix_ts) ``` ```