

**支援終止通知：**2026 年 10 月 30 日， AWS 將結束對 Amazon Pinpoint 的支援。2026 年 10 月 30 日之後，您將無法再存取 Amazon Pinpoint 主控台或 Amazon Pinpoint 資源 (端點、區段、行銷活動、旅程和分析)。如需詳細資訊，請參閱 [Amazon Pinpoint 終止支援](https://docs.aws.amazon.com/console/pinpoint/migration-guide)。**注意：**與 SMS、語音、行動推播、OTP 和電話號碼驗證相關的 APIs 不受此變更影響，並受 AWS 最終使用者傳訊支援。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 從 Amazon Pinpoint 的應用程式事件資料串流
<a name="event-streams-data-app"></a>

將應用程式 （應用程式） 與 Amazon Pinpoint 整合並設定事件串流後，Amazon Pinpoint 會從您在設定期間指定的目的地擷取應用程式的使用者活動、自訂事件和訊息傳遞資料，供您檢視。如需如何設定事件串流以便檢視事件資料的詳細資訊，請參閱 [設定 Amazon Pinpoint 透過 Amazon Kinesis 或 Amazon Data Firehose 串流應用程式事件資料](event-streams-setup.md)。

## 應用程式事件範例
<a name="event-streams-data-app-example"></a>

應用程式事件的 JSON 物件包含以下範例所示的資料。

```
{
  "event_type": "_session.stop",
  "event_timestamp": 1487973802507,
  "arrival_timestamp": 1487973803515,
  "event_version": "3.0",
  "application": {
    "app_id": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
    "cognito_identity_pool_id": "us-east-1:a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
    "package_name": "main.page",
    "sdk": {
      "name": "aws-sdk-mobile-analytics-js",
      "version": "0.9.1:2.4.8"
    },
    "title": "title",
    "version_name": "1.0",
    "version_code": "1"
  },
  "client": {
    "client_id": "m3n4o5p6-a1b2-c3d4-e5f6-g7h8i9j0k1l2",
    "cognito_id": "us-east-1:i9j0k1l2-m3n4-o5p6-a1b2-c3d4e5f6g7h8"
  },
  "device": {
    "locale": {
      "code": "en_US",
      "country": "US",
      "language": "en"
    },
    "make": "generic web browser",
    "model": "Unknown",
    "platform": {
      "name": "android",
      "version": "10.10"
    }
  },
  "session": {
    "session_id": "f549dea9-1090-945d-c3d1-e4967example",
    "start_timestamp": 1487973202531,
    "stop_timestamp": 1487973802507
  },
  "attributes": {},
  "metrics": {}
}
```

## 應用程式事件屬性
<a name="event-streams-data-app-attributes"></a>

本節定義應用程式事件串流先前範例中包含的屬性。


| 屬性 | 描述 | 
| --- | --- | 
| event\$1type |  事件的類型。可能值為： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/pinpoint/latest/developerguide/event-streams-data-app.html)  | 
| event\$1timestamp | 報告事件的時間，以 Unix 時間顯示 (毫秒)。 | 
| arrival\$1timestamp | Amazon Pinpoint 收到事件的時間，顯示為 Unix 時間 (以毫秒為單位)。 | 
| event\$1version |  事件 JSON 結構描述的版本。  在您的事件處理應用程式中檢查此版本，讓您知道何時更新應用程式以回應結構描述更新。   | 
| application | 與事件相關聯的 Amazon Pinpoint 專案的資訊。如需詳細資訊，請參閱[應用程式](#event-streams-data-app-attributes-application)表。 | 
| client | 回報事件的端點相關資訊。如需詳細資訊，請參閱[用戶端](#event-streams-data-app-attributes-client)表。 | 
| device | 回報事件的裝置資訊。如需詳細資訊，請參閱[裝置](#event-streams-data-app-attributes-device)表。 | 
| session | 產生事件的工作階段資訊。如需詳細資訊，請參閱[工作階段](#event-streams-data-app-attributes-session)表。 | 
| attributes |  與事件相關聯的屬性。針對您應用程式報告的事件，此物件包含您定義的自訂屬性。  | 
| metrics | 與事件有關的指標。(選用) 您可以設定應用程式將自訂指標傳送到 Amazon Pinpoint。 | 

### 應用程式
<a name="event-streams-data-app-attributes-application"></a>

包含與事件相關聯的 Amazon Pinpoint 專案資訊。


| 屬性 | 描述 | 
| --- | --- | 
| app\$1id |  回報事件的 Amazon Pinpoint 專案的唯一 ID。  | 
| cognito\$1identity\$1pool\$1id |  與端點相關聯的 Amazon Cognito 身分池的 ID。  | 
| package\$1name |  應用程式套件的名稱，例如 `com.example.my_app`。  | 
| sdk |  用於報告事件的開發套件資訊。如需詳細資訊，請參閱[軟體開發套件](#event-streams-data-app-attributes-application-sdk)表。  | 
| title |  應用程式的名稱。  | 
| version\$1name |  應用程式的版本名稱，例如 `V2.5`。  | 
| version\$1code |  應用程式的版本號碼，例如 `3`。  | 

#### SDK
<a name="event-streams-data-app-attributes-application-sdk"></a>

包括用於報告事件的軟體開發套件資訊。


| 屬性 | 描述 | 
| --- | --- | 
| name | 用來報告事件的開發套件名稱。 | 
| version | 開發套件的版本。 | 

### 用戶端
<a name="event-streams-data-app-attributes-client"></a>

包含產生事件的端點相關資訊。


| 屬性 | 描述 | 
| --- | --- | 
| client\$1id | 端點的 ID。 | 
| cognito\$1id | 與端點相關聯的 Amazon Cognito ID 權杖。 | 

### 裝置
<a name="event-streams-data-app-attributes-device"></a>

包含產生事件之端點的裝置相關資訊。


| 屬性 | 描述 | 
| --- | --- | 
| locale |  端點裝置的語言和區域設定相關資訊。如需詳細資訊，請參閱[地區設定](#event-streams-data-app-attributes-device-locale)表。  | 
| make | 端點裝置的製造商。 | 
| model | 端點裝置的型號識別碼。 | 
| platform |  端點裝置上作業系統的相關資訊。如需詳細資訊，請參閱[平台](#event-streams-data-app-attributes-device-platform)表。  | 

#### Locale
<a name="event-streams-data-app-attributes-device-locale"></a>

包括端點裝置的語言和區域設定相關資訊。


| 屬性 | 描述 | 
| --- | --- | 
| code | 與裝置關聯的地區設定識別符。 | 
| country | 與裝置地區設定相關聯的國家或區域。 | 
| language | 與裝置地區設定相關聯的語言。 | 

#### 平台
<a name="event-streams-data-app-attributes-device-platform"></a>

包括端點裝置上作業系統的相關資訊。


| 屬性 | 描述 | 
| --- | --- | 
| name | 裝置上的作業系統名稱。 | 
| version | 裝置上的作業系統版本。 | 

### Session (工作階段)
<a name="event-streams-data-app-attributes-session"></a>

包含產生事件的工作階段資訊。


| 屬性 | 描述 | 
| --- | --- | 
| session\$1id | 識別工作階段的唯一 ID。 | 
| start\$1timestamp | 工作階段開始的日期和時間，以 Unix 時間顯示 (毫秒)。 | 
| stop\$1timestamp | 工作階段結束的日期和時間，以 Unix 時間顯示 (毫秒)。 | 