{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"TD JavaScript SDK Version 4.2.1への移行について","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":"td-javascript-sdk-version-421への移行について","__idx":0},"children":["TD JavaScript SDK Version 4.2.1への移行について"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この記事では、v2またはv3のweb trackingモジュールをv4に移行する方法について説明します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-javascript-sdk-40の新機能","__idx":1},"children":["TD JavaScript SDK 4.0の新機能"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td-js-sdk v4には以下の変更が加えられています:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SDKは新しい\"records.in\" ingest base URLを使用するようになりました。たとえば、USの開発者はingest endpointを\"https://us01.records.in.treasuredata.com\"に設定します。(リージョン別の新しいingest endpointのリストについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["Treasure Data SitesとbaseURL"]},"を参照してください。)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SDKは以下の値を入力しなくなりました:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["td_browser"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["td_browser_version"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["td_os"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["td_os_version"]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これらの値は、HiveまたはTrino関数",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/queries/sql-reference/td_trino_function_reference#td_parse_user_agent"},"children":["TD_PARSE_USER_AGENT"]},"を使用してtd_user_agentを解析することで取得できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["JS SDKのバージョン文字列は、メトリック追跡とトレースのためにtd_user_agentプロパティに追加されます。たとえば、以下のブラウザにはJSSDK/4.0.1が追加されます:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AppleWebKit/537.36 (KHTML, like Gecko)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Chrome/116.0.0.0"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Safari/537.36"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"制限事項","__idx":2},"children":["制限事項"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Real-time segmentationを使用するには、バックエンドからのルーティング有効化が必要です。リアルタイム処理用のJS SDK 4.xを有効にする支援については、Treasure サポートにお問い合わせください。Treasure サポートには以下の情報を提供できるように準備してください:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["アカウント番号"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Database名"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Table名"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataは、将来のリリースでこの制限を削除する予定です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["バージョン4.xへの移行手順については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/integration-hub/streaming/td-javascript-sdk/migrating-to-td-js-sdk-4-0"},"children":["TD JS SDK 4.0への移行"]},"を参照してください。"]}]},"headings":[{"value":"TD JavaScript SDK Version 4.2.1への移行について","id":"td-javascript-sdk-version-421への移行について","depth":1},{"value":"TD JavaScript SDK 4.0の新機能","id":"td-javascript-sdk-40の新機能","depth":2},{"value":"制限事項","id":"制限事項","depth":2}],"frontmatter":{"seo":{"title":"TD JavaScript SDK Version 4.2.1への移行について"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/integration-hub/streaming/td-javascript-sdk/about-migrating-to-td-javascript-sdk-version-4-2-1","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}