menu
Is this helpful?

# プリセットプロパティ

# プリセットプロパティ説明

iOS,Androidで集取できるプリセットプロパティは以下のドキュメントを参考してください。

iOSプリセットプロパティ Androidプリセットプロパティ

PCプリセットプロパティ:

プリパティ名 名称 タイプ 説明
#ip IP アドレス 文字列 ユーザのIPアドレス、TAはユーザの地理的位置情報
#country 文字列 ユーザーの国または地域は、IPアドレスに基づいて生成
#country_code 国コード 文字列 ユーザーの所在する国または地域の国別地域コード(ISO 3166-1 alpha-2、つまり2大文字英字)は、IPアドレスに基づいて生成
#province 文字列 ユーザーの州、IPアドレスに基づいて生成
#city 都市 文字列 ユーザーの都市は、IPアドレスに基づいて生成
#screen_height スクリーン高さ 数値 ユーザーデバイスのスクリーンの高さ、1920など
#screen_width スクリーン長さ 数値 ユーザーデバイスのスクリーンの長さ、1080など
#device_id デバイス ID 文字列 ユーザーのデバイスID、iOSはユーザーのIDFVやUUID、AndroidはAndroidIDを取得
#lib SDK タイプ 文字列 SDKのタイプ:Android,iOSなど
#lib_version SDK バージョン 文字列 SDKのバージョン

# プリセットプロパティを取得

以下の方法でサーバのトラッキングはApp側の一部プリセットプロパティを取得し、サーバ側に転送できます。

  //get property objects
   PresetProperties* presetProperties =  TDAnalytics::getPresetProperties();

   //Preset properties of Event
   TDJSONObject* properties = presetProperties->toEventPresetProperties();
   /*
   {
        "#carrier": "T-Mobile",
        "#os": "Android",
        "#device_id": "abb8e87bfb5ce66c",
        "#screen_height": 2264,
        "#bundle_id": "com.sw.thinkingdatademo",
        "#manufacturer": "realme",
        "#device_model": "RMX1991",
        "#screen_width": 1080,
        "#system_language": "zh",
        "#os_version": "10",
        "#network_type": "WIFI",
        "#zone_offset": 8,
        "#app_version":"1.0"
    }
   */

    //get a certain preset properties
    string bundleId = presetProperties->bundleId;//package name
    string os =  presetProperties->os; //os type, e.g., Android
    string systemLanguage = presetProperties->systemLanguage; //type of mobile phone system language
    int screenWidth = presetProperties->screenWidth; //screen width
    int screenHeight = presetProperties->screenHeight; //screen height
    string deviceModel = presetProperties->deviceModel; //device model
    string deviceId = presetProperties->deviceId;//unique identifier of device
    string carrier = presetProperties->carrier; //information about operator of the SIM card. Operation information of the primary card should be get under dual-card dual-standby mode
    string manufacture = presetProperties->manufacturer; //mobile phone manufacturer, e.g., HuaWei
    string networkType = presetProperties->networkType; //network type
    string osVersion = presetProperties->osVersion; //system version number
    string appVersion = presetProperties->appVersion; //app version number
    double zoneOffset = presetProperties->zoneOffset; //timezone offset value

IP、国都市の情報はサーバ側で解析して生成され、クライアントからの呼び出しが提供されていません。