{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Mobile Tracking と Mobile SDK について","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"mobile-tracking-と-mobile-sdk-について","__idx":0},"children":["Mobile Tracking と Mobile SDK について"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data は以下の SDK を提供しています: Android、iOS、Unity、Unreal。これらの mobile SDK を使用することで、アプリケーションのデータを Treasure Data にインポートできます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細については以下をご覧ください:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/integration-hub/streaming/mobile/about-mobile-tracking-and-mobile-sdks#h1_551784748"},"children":["Mobile SDK の機能"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/integration-hub/streaming/mobile/about-mobile-tracking-and-mobile-sdks#h1__1882299180"},"children":["Mobile SDK のアカウント管理"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/integration-hub/streaming/mobile/about-mobile-tracking-and-mobile-sdks#h1_1773140935"},"children":["Mobile SDK の詳細"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data では、本番環境で使用を開始する前に、Treasure Data JavaScript SDK version 3 を使用してサイトでの新機能の実装を検証することを推奨しています。Cookie の管理方法が異なりますのでご注意ください。これらの記事のほとんどを参照する際は、提案されている event collector と Treasure Data JavaScript SDK version 3 の呼び出しをソリューションに定義する必要があります。例えば、//cdn.treasuredata.com/sdk/2.5/td.min.js を //cdn.treasuredata.com/sdk/3.0.0/td.min.js に変更してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"mobile-sdk-の機能","__idx":1},"children":["Mobile SDK の機能"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SDK には以下の機能があります:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アプリケーションで発生する event を追加する(client 側でバッファリング)(addEvent/addEventWithCallback)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["バッファリングされたデータを任意の共通キーで自動的に暗号化/復号化する(initializeEncryptionKey、デフォルト:無効)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["バッファリングされた event を TD にアップロードする(データ損失を避けるため、バッファリングされたデータはアップロードが成功した場合のみクリアされます)(uploadEvents/uploadEventsWithCallback)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アップロード失敗時に一定回数アップロードを再試行する(Exponential backoff)(enableRetryUploading/disableRetryUploading、デフォルト:有効)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["アップロードされるデータは自動的に元のサイズの8分の1に圧縮されます(enableEventCompression/diableEventCompression、デフォルト:有効)"]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["操作(Event の追加またはアップロード)の成功または失敗に応じて呼び出す Callback を登録する(addEventWithCallback/uploadEventsWithCallback)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SDK は各デバイスに対して一意の ID を生成します。この ID は各 event に自動的に追加されるため、各デバイスのデータの集計が容易になります。(enableAutoAppendUniqId/disableAutoAppendUniqId、デフォルト:無効)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OS version またはデバイスモデル情報を各 event に自動的に追加する。(enableAutoAppendModelInformation/disableAutoAppendModelInformation、デフォルト:無効)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SDK は各 session の開始/終了時に session id を生成します。session id は各 event に自動的に追加されるため、アプリケーション内で発生した一連の event ごとに集計できます。(startSession/endSession)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アプリケーションが実行されていたかどうかを SDK が監視するため、アプリケーションの初回実行を検出します。(isFirstRun/clearFirstRun)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["server 側で重複排除を実行することで、複数回更新した場合でもデータの重複を防ぎます。(現在、毎日重複排除を実行しています)"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各機能の末尾に記載されている文字列は、SDK API 名(具体的には TreasureData class のメソッド名)です。SDK で event を登録するための database と table を設定する必要があります。これらは Treasure Data の宛先 database および宛先 table と連携します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例えば、以下の図は、enableAutoAppendUniqId と enableAutoAppendModelInformation を有効にして startSession と endSession を使用した場合の Treasure Data のサンプルデータの一部を示しています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191021-202312.4b9ee784cfac565f5d3e44300859346f591723aa2ad95729ad1da5064ec9e66d.ad50cbca.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"mobile-sdk-のアカウント管理","__idx":2},"children":["Mobile SDK のアカウント管理"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data では、データのインポートやクエリの発行時に authentication のための API Key が必要です。mobile SDK(JavaScript SDK も含む)を使用する場合は、以下の手順を推奨します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SDK からのインポート用に Treasure Data 上に database を作成します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記の database へのアクセス権限を持つユーザーを、Treasure Data ユーザーと関連付けます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["https://console.treasuredata.com/app/users から「Add Team Member」を使用して、ユーザーを Treasure Data ユーザーと関連付けることができます。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記のユーザーに対して ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Write-only"]}," API key を生成します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["生成した ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Write-only"]}," API key を SDK で使用します。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソール で ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["My Profile"]}," を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API Keys パネルでパスワードを入力します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Write-only API key を生成します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191021-202320.a0f121ae50d1cf0b63550eb57a20d0a8842eabd7df7af63fb310954699c8fd63.ad50cbca.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"mobile-sdk-の詳細","__idx":3},"children":["Mobile SDK の詳細"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/streaming/mobile/android"},"children":["Android SDK"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/streaming/mobile/ios"},"children":["iOS SDK"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/unity-sdk"},"children":["Unity SDK"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-integrations/unreal-engine-sdk-import-integration"},"children":["Unreal SDK Import Integration"]}]}]}]}]},"headings":[{"value":"Mobile Tracking と Mobile SDK について","id":"mobile-tracking-と-mobile-sdk-について","depth":1},{"value":"Mobile SDK の機能","id":"mobile-sdk-の機能","depth":1},{"value":"Mobile SDK のアカウント管理","id":"mobile-sdk-のアカウント管理","depth":1},{"value":"Mobile SDK の詳細","id":"mobile-sdk-の詳細","depth":1}],"frontmatter":{"seo":{"title":"Mobile Tracking と Mobile SDK について"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/integration-hub/streaming/mobile/about-mobile-tracking-and-mobile-sdks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}