メインコンテンツまでスキップ

プリセットプロパティ

最終更新 2026/10/03

1. プリセットプロパティの説明​

各プラットフォームで収集されるプリセットプロパティには多少の違いがあります。詳しくは次のドキュメントを参照してください: Androidプラットフォーム、iOSプラットフォーム

2. プリセットプロパティの取得​

サーバー側のトラッキングでApp側のプリセットプロパティが必要な場合は、このメソッドでApp側のプリセットプロパティを取得してから、サーバー側に渡すことができます。

-- プロパティオブジェクトを取得
local presetProperties = TDAnalytics.getPresetProperties()

-- イベントのプリセットプロパティを生成
local properties = presetProperties.toEventPresetProperties()
--[[
{
"#carrier": "中国电信",
"#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"
}
]]--

-- 特定のプリセットプロパティを取得
local bundleId = presetProperties.bundleId -- パッケージ名
local mOS = presetProperties.os -- OSタイプ。Android/iOSなど
local systemLanguage = presetProperties.systemLanguage -- 携帯電話のシステム言語タイプ
local screenWidth = presetProperties.screenWidth -- 画面の幅
local screenHeight = presetProperties.screenHeight -- 画面の高さ
local deviceModel = presetProperties.deviceModel -- デバイスモデル
local deviceId = presetProperties.deviceId -- デバイスの一意の識別子
local carrier = presetProperties.carrier -- 携帯電話のSIMカードのキャリア情報。デュアルSIMの場合は、メインカードのキャリア情報を取得
local manufacture = presetProperties.manufacturer -- 携帯電話のメーカー(HuaWeiなど)
local networkType = presetProperties.networkType -- ネットワークタイプ
local osVersion = presetProperties.osVersion -- システムのバージョン番号
local appVersion = presetProperties.appVersion -- appのバージョン番号
local zoneOffset = presetProperties.zoneOffset -- タイムゾーンオフセット値

IP、国、都市の情報はサーバー側で解析して生成されるため、クライアントにはこれらのプロパティを取得するインターフェースはありません

このページは役に立ちましたか?