

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 报告广告跟踪数据
<a name="ad-reporting"></a>

MediaTailor 提供了两个选项，用于跟踪和报告观众观看了多少广告。在服务器端广告报告方法中， MediaTailor 跟踪广告并直接向广告服务器发送信标（跟踪信号）。或者，在客户端跟踪方法中，客户端玩家（用户的设备）跟踪广告并将信标发送到广告服务器。播放会话中使用的广告报告类型取决于玩家在播放会话中发起会话的具体请求 MediaTailor。

有关使用动态变量向广告服务器传递会话和玩家数据的信息，请参阅[MediaTailor ADS 请求的动态广告变量](variables.md)。有关会话初始化参数的详细信息，请参见[MediaTailor 清单查询参数](manifest-query-parameters.md)。

**Topics**
+ [MediaTailor 服务器端广告跟踪和报告](ad-reporting-server-side.md)
+ [客户端广告跟踪](ad-reporting-client-side.md)

# MediaTailor 服务器端广告跟踪和报告
<a name="ad-reporting-server-side"></a>

AWS Elemental MediaTailor 默认为服务器端报告，用于全面的广告跟踪和监测。借助服务器端报告，当播放器请求清单中的广告 URL 时，此服务会直接将广告使用情况报告至广告跟踪 URL。在播放器使用初始化播放会话后 MediaTailor，您或该玩家无需进一步输入即可执行服务器端报告。在播放每个广告时， MediaTailor 会向广告服务器发送信标，以报告广告的浏览量。 MediaTailor 为广告的开头和以四分位数为单位的广告进度发送信标：第一个四分位数、中点、第三个四分位数和广告完成量。

**执行服务器端广告报告**
+ 在播放器中，根据您的协议，使用以下格式之一的请求初始化新的 MediaTailor 播放会话：
  + 示例：HLS 格式

    ```
    GET <mediatailorURL>/v1/master/<hashed-account-id>/<origin-id>/<asset-id>?ads.<key-value-pairs-for-ads>&<key-value-pairs-for-origin-server>
    ```
  + 示例：DASH 格式

    ```
    GET <mediatailorURL>/v1/dash/<hashed-account-id>/<origin-id>/<asset-id>?ads.<key-value-pairs-for-ads>&<key-value-pairs-for-origin-server>
    ```

  这些键值对是广告跟踪的动态目标参数。有关向请求添加参数的信息，请参阅 [MediaTailor ADS 请求的动态广告变量](variables.md)。

AWS Elemental MediaTailor 使用清单 URL 响应请求。清单包含 URLs 媒体清单。媒体清单包含广告分段请求的嵌入式链接。

**注意**  
当在跟踪网址中 MediaTailor 遇到双斜杠 (//) 时，它会将斜杠折叠为一个 (/)。

当玩家从广告区段网址（`/v1/segment`路径）请求播放时， AWS Elemental MediaTailor 会通过广告跟踪向广告服务器发送相应的信标 URLs。同时，此服务会将重定向发送到实际的 `*.ts` 广告分段。广告区段要么位于 MediaTailor 存储转码广告的 Amazon CloudFront 分发中，要么位于您缓存广告的内容分发网络 (CDN) 中。

以下各节提供了有关使用服务器端广告跟踪的 MediaTailor更多信息。

**Topics**
+ [SGAI 服务器端跟踪](ad-reporting-server-side-sgai.md)
+ [信标词汇表](ad-reporting-server-side-beacon-glossary.md)
+ [定时和缓存行为](ad-reporting-server-side-timing-behavior.md)
+ [追踪功能](ad-reporting-server-side-features.md)

# 使用服务器引导广告插入 (SGAI) 进行服务器端跟踪
<a name="ad-reporting-server-side-sgai"></a>

当您使用服务器引导式广告插入 (SGAI) 时，服务器端跟踪使用的*无会话信标机制与*上述拼接模式方法不同。SGAI 没有将广告细分 MediaTailor 拼接到内容清单（用于跟踪`/v1/segment`请求）中，而是在资产列表响应中将广告引用作为单独的播放列表返回，广告中嵌入了信标元数据。 URIs

## 无会话服务器端信标的工作原理
<a name="ad-reporting-server-side-sgai-how-it-works"></a>

以下步骤描述了服务器端信标如何适用于 SGAI 会话：

1. **会话初始化**：玩家使用请求HLS多变体播放列表。`aws.insertionMode=GUIDED`服务器端报告是默认设置（不需要任何`aws.reportingMode`参数）。与拼接模式不同，会话初始化响应*不*包括。`trackingUrl`

1. **Cacheable manifest**： MediaTailor返回一个可缓存的清单，其中包含指向 MediaTailor插页式资产列表端点的`EXT-X-DATERANGE`标签`CLASS="com.apple.hls.interstitial"`和`X-ASSET-LIST`属性。

1. 包含@@ **信标元数据的资产列表**：当玩家遇到广告插播时，它会获取资产列表。 MediaTailor返回一个 JSON 响应，其中每个广告 URI 都包含加密的信标元数据：

   ```
   {
     "ASSETS": [
       {
         "DURATION": 30.0,
         "URI": "https://cdn.example.com/ad/master.m3u8?awsBeaconData=<encrypted>&awsBeaconDomain=<MediaTailor-endpoint>&awsConfigurationName=<config-name>"
       }
     ]
   }
   ```

   当服务器端报告处于活动状态时，响应中*不*包含`TRACKING`部分。该广告 URIs 包含所有信标数据。

1. **HLS 变量替换**：玩家获取广告多变体播放列表。广告清单使用`#EXT-X-DEFINE:QUERYPARAM`指令 URLs 通过 HLS 变量替换将 URI 查询字符串中的信标参数传递到区段：

   ```
   #EXTM3U
   #EXT-X-DEFINE:QUERYPARAM="awsBeaconData"
   #EXT-X-DEFINE:QUERYPARAM="awsBeaconDomain"
   #EXT-X-DEFINE:QUERYPARAM="awsConfigurationName"
   #EXTINF:5.0,
   {$awsBeaconDomain}/segment/hash/{$awsConfigurationName}/{$awsBeaconData}/0/0?aws.segmentRelativePath=asset_00001.ts
   ```

   玩家使用广告清单 URI 查询字符串中的值解析`{$awsBeaconData}``{$awsBeaconDomain}`、和`{$awsConfigurationName}`变量，然后通过 MediaTailor请求每个广告段。

1. **根据区段请求触发信标**：当玩家请求每个广告区段时，请求就会通过 MediaTailor。该服务解密信标数据，确定区段在广告中的位置（展示次数、第一四分位数、中点、第三四分位数或完整），然后向广告服务器发射相应的 VAST 跟踪信标。 MediaTailor 然后将玩家重定向到实际的广告内容细分。

## 玩家对 SGAI 服务器端信标的要求
<a name="ad-reporting-server-side-sgai-requirements"></a>

要在 SGAI 中使用服务器端信标，您的玩家必须满足以下要求：
+ HLS 版本 11 或更高版本
+ Support 支持 `EXT-X-DATERANGE` HLS 插页式广告的 with `CLASS` 属性
+ 支持`#EXT-X-DEFINE:QUERYPARAM`变量替换 (RFC 8216bis)。玩家必须先对查询参数值进行百分比解码，然后才能将其替换为分段。 URLs

**注意**  
目前仅支持 HLS 的 SGAI 服务器端信标。SGAI 服务器端信标尚不支持 DASH。

## 与缝合模式服务器端跟踪的比较
<a name="ad-reporting-server-side-sgai-comparison"></a>

下表汇总了拼接广告和服务器引导广告插入之间服务器端跟踪的区别：


| 方面 | 缝合 (SSAI) | 服务器引导 (SGAI) | 
| --- | --- | --- | 
| 清单可缓存性 | 每会话，不可缓存 | 可缓存，在观众之间共享 | 
| 广告区段路由 | 通过/v1/segment/使用会话 ID | 通过/v1/segment/使用加密的信标数据 blob | 
| 信标的会话状态 | 按会话存储在 MediaTailor | 无会话 — 所有状态均在加密参数中传输 awsBeaconData | 
| 会话初始化时跟踪网址 | 在会话初始化响应中返回 | 未提供 — 信标数据嵌入广告 URIs 中的每个资产列表响应中 | 
| DASH 支持 | 支持 | 暂不支持 | 

**注意**  
对于实时 SGAI 会话，您可以使用启用基于清单的广告预取。`aws.guidedPrefetchMode=MANIFEST`这与拼接 (SSAI) 会话中使用的基于调度的预取 API 是分开的。有关更多信息，请参阅 [引导式预取，带有明显的心跳声](sgai-guided-prefetch.md)。

# 服务器端跟踪信标词汇表
<a name="ad-reporting-server-side-beacon-glossary"></a>

MediaTailor 服务器端跟踪使用一组标准化的信标向广告服务器和验证服务机构报告广告观看进度。这些信标符合美国互动广告局 (IAB) 的视频广告衡量标准，可准确报告广告曝光量和完成率。


**服务器端跟踪信标类型**  

| 信标类型 | 被解雇时 | 用途 | 时机详情 | 
| --- | --- | --- | --- | 
| 印象 | 当玩家请求第一个广告区段时 | 表示广告内容已开始加载并即将向观众展示 | 在第一个广告/v1/segment请求时触发。符合 IAB 的指导方针，要求广告内容在计算曝光量之前开始加载。[服务器端跟踪工作流程](ad-reporting-server-side-timing-behavior.md#ad-reporting-server-side-timing-behavior-workflow)有关完整序列，请参见。 | 
| 启动 | 当玩家开始呈现广告内容时 | 确认广告播放已实际开始 | 通常在第一个细分请求上与展示信标同时触发，但表示广告呈现的实际开始。这种区别对于分别跟踪展示和开始事件的验证服务非常重要。 | 
| 第一四分位数 | 当玩家达到广告时长的 25% | 衡量广告第一季度的持续观看量 | 当玩家请求包含广告时长 25% 的区段时触发。例如，在一则包含 2 秒区段的 20 秒广告中，这通常会在请求第 3 个区段（广告开始大约 4-6 秒后）时触发。 | 
| 中点 | 当玩家达到广告时长的 50% | 衡量广告在半数广告中持续观看广告的情况 | 当玩家请求包含广告时长 50% 的区段时触发。例如，在一则包含 2 秒区段的 20 秒广告中，这通常会在请求第 5 个区段（广告开始大约 8-10 秒后）时触发。 | 
| 第三四分位数 | 当玩家达到广告时长的 75% | 衡量在四分之三的广告中持续观看广告的情况 | 当玩家请求包含广告时长 75% 的分段时触发。例如，在一则包含 2 秒区段的 20 秒广告中，这通常会在请求第 8 个区段（广告发布后大约 14-16 秒）时触发。 | 
| 完成 | 当玩家到达广告结尾时 | 确认整则广告已投放给观众 | 当玩家请求广告的最后一部分时触发。这表明观众可能已经看到了整个广告内容。例如，在一则包含 2 秒区段的 20 秒广告中，这通常会在请求第 10 个区段（广告开始大约 18-20 秒）时触发。 | 

**注意**  
信标发射的确切时间取决于片段持续时间和广告时长。 MediaTailor 根据特定的广告持续时间和细分结构计算与每个四分位数位置相对应的相应细分请求。

# 服务器端跟踪定时和缓存行为
<a name="ad-reporting-server-side-timing-behavior"></a>

在服务器端报告中，根据玩家的实际细分请求 MediaTailor 触发跟踪事件，而不是根据清单解析或预加载活动触发跟踪事件。这种方法可确保精确的展示次数统计，符合视频广告衡量行业标准。

## 关键时机原则
<a name="ad-reporting-server-side-timing-behavior-principles"></a>

MediaTailor 服务器端跟踪遵循以下基本计时原则：
+ **跟踪事件会根据实际的分段请求触**发——信标仅在玩家向其发出 HTTP 请求时发送 `/v1/segment` URLs，而不是在清单解析或缓存期间发送。
+ **玩家缓存和清单的预加载不会触发事件**-玩家可以在不生成任何跟踪事件的情况下解析、缓存或预加载清单信息。
+ **区段预提取*将*触发事件** ——如果玩家在播放之前预先获取实际的广告区段，则这遵循行业标准行为，即细分请求构成有效的曝光量。
+ **每个 /v1/segment 请求都会触发相应的信标-具体的跟踪事件（展示次数、四分位数、完成量）由所请求的广告位置和细分**决定。
+ **时间安排符合IAB标准** ——该方法遵循了互动广告局关于视频广告衡量和展示次数统计的指导方针。

## 服务器端跟踪工作流程
<a name="ad-reporting-server-side-timing-behavior-workflow"></a>

下图说明了完整的服务器端跟踪工作流程，显示了何时触发与玩家请求相关的跟踪事件：

**第 1 阶段：会话初始化**  
玩家从中请求清单 MediaTailor，清单会返回包含广告细分的个性化清单 URLs：  

![\[会话初始化阶段显示玩家请求清单 MediaTailor 并接收带有广告细分的个性化清单 URLs。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ss-track-phase1.png)


**第 2 阶段：广告请求和展示次数跟踪**  
当玩家请求第一个广告区段时， MediaTailor 会向广告决策服务器和广告验证服务发送展示并启动信标：  

![\[广告展示跟踪阶段显示，当玩家请求第一个广告区段时，会向广告决策服务器和广告验证服务 MediaTailor 发送展示和起始信标。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ss-track-phase2.png)


**第 3 阶段：四分位数跟踪**  
MediaTailor 根据后续分段请求发射四分位数信标（第一四分位数、中点、第三四分位数、完成）：  

![\[四分位数跟踪阶段显示，当玩家请求后续的广告细分时，会向广告决策服务器和广告验证服务 MediaTailor 发射四分位数信标。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ss-track-phase3.png)


**第 4 阶段：分段交付**  
触发跟踪信标后， MediaTailor 重定向到来自 Amazon CloudFront 或您的 CDN 的实际广告段：  

![\[细分投放阶段显示了在触发跟踪信标后 MediaTailor 将玩家重定向到来自 CloudFront 或 CDN 的实际广告区段。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ss-track-phase4.png)


服务器端跟踪工作流程包括以下关键计时行为：

1. **会话初始化**-玩家从中请求清单 MediaTailor。 MediaTailor 返回包含 URLs 带有`/v1/segment`路径的广告细分的个性化清单。

1. **清单解析和缓存**-玩家解析清单，并可能预加载或缓存片段信息。无论玩家缓存行为如何，**在此阶段都不会触发任何跟踪事件**。

1. **广告细分请求和展示次数跟踪**-当玩家实际请求第一个广告区段（通常用于播放）时， MediaTailor 会向广告决策服务器和广告验证服务启动展示信标并开始跟踪事件。这发生在对 `/v1/segment` URL 的实际 HTTP 请求上，而不是在解析清单时。

1. **基于细分请求的四分位数跟踪**- MediaTailor 根据与广告持续时间内计算出的四分位数位置相对应的后续细分请求，向广告决策服务器和广告验证服务发送四分位数信标（第一四分位数、中点、第三四分位数、完成）。

1. **区段投**放-触发相应的跟踪信标后， MediaTailor 向实际广告区段（来自亚马逊 CloudFront 或您的 CDN）发出 HTTP 重定向。

## 玩家缓存和预加载注意事项
<a name="ad-reporting-server-side-timing-behavior-caching-considerations"></a>

MediaTailor 服务器端跟踪旨在与各种玩家缓存和预加载策略兼容，同时保持精确的印象测量：
+ **清单预加载**-预加载或缓存清单信息的玩家不会触发跟踪事件。只有在发出实际区段请求时才会触发跟踪事件。
+ **区段预提取**-如果玩家在播放之前预先提取了广告片段，则在请求这些区段时（可能早于实际播放时间）将触发跟踪事件。这种行为符合将细分请求视为有效展示次数的行业标准。
+ **玩家缓冲**-标准玩家缓冲行为（在播放前稍微提前请求片段）将根据分段请求模式在适当的时间触发跟踪事件。

## 对追踪差异进行故障排除
<a name="ad-reporting-server-side-timing-behavior-troubleshooting"></a>

如果您发现 MediaTailor 服务器端跟踪与第三方指标之间存在差异，请考虑以下因素：
+ **玩家行为差异**-不同的玩家可能有不同的预取和缓冲策略，这些策略会影响何时发出分段请求。
+ **网络状况**-网络状况不佳可能会导致玩家多次或以不同于预期的时间间隔请求分段。
+ **CDN 配置**-不正确的 CDN `/v1/segment` 请求缓存可能导致错过或重复跟踪事件。
+ **会话管理**-确保每个播放会话都使用唯一的会话标识符，以防止跟踪事件冲突。

有关详细的故障排除指南，请参阅[排查常见 问题](monitoring-and-troubleshooting.md#troubleshooting-common-issues)。

# MediaTailor 服务器端跟踪特性和功能
<a name="ad-reporting-server-side-features"></a>

AWS Elemental MediaTailor 自动应用这些集成的服务器端跟踪功能，以优化广告衡量的准确性和可靠性。该系统可防止重复信标，在高流量期间管理流量，维护正确的事件顺序，并提供全面的性能监控，而无需您进行任何配置。您只需要确保您的广告决策服务器 (ADS) 在 VAST 响应中提供跟踪信标即可。

**注意**  
这些功能将于 2025 年 9 月 30 日起向新客户开放。作为持续服务改进的一部分，现有客户将在2025年全年获得访问权限。如果您想立即使用这些功能，请联系 [AWS Support](https://aws.amazon.com/premiumsupport/)。

**注意**  
这些功能适用于拼接 (SSAI) 和服务器引导 (SGAI) 广告插入方法。两种模式下的信标类型和时间相同。它们在 MediaTailor 触发信标的方式上有所不同 — 有关 SGAI 服务器端信标[使用服务器引导广告插入 (SGAI) 进行服务器端跟踪](ad-reporting-server-side-sgai.md)的详细信息，请参阅。

## 信标重复数据删除
<a name="ad-reporting-server-side-beacon-deduplication"></a>

MediaTailor 防止针对相同的广告事件重复触发信标。服务器端跟踪系统在每个广告观看会话中仅发送一次展示次数、四分位数和完成信标。当视频播放器由于网络状况、比特率变化或缓冲策略而多次请求相同的广告段时，会 MediaTailor 跟踪已发射的信标并屏蔽冗余传输。

重复数据删除可自动解决导致信标数量膨胀的常见情况：
+ **自适应比特率直播**-当玩家下载同一广告片段的不同质量变体时
+ **网络重试场景**-当玩家因网络问题或超时而重新请求分段时
+ **玩家缓冲策略**-当玩家出于缓冲目的预取或重新获取片段时

该系统旨在仅发射一次印象信标，即使玩家在不同的质量等级之间切换。

## 自适应限制和信标重试
<a name="ad-reporting-server-side-adaptive-throttling"></a>

MediaTailor 根据服务器响应指示器自动管理信标流量速率。系统监控 HTTP 响应模式、连接超时和错误代码以检测拥塞，然后相应地调整流量速率。当系统识别出服务器压力指标时，它会降低受影响域的流量速率，并在服务器表现出更高的容量时自动提高速率。

系统使用以下指标监控服务器运行状况：
+ **HTTP 连接超**时-当测量平台未在预期的时间范围内做出响应时
+ **错误响应代码**-表示服务器过载的 503、504 和 507 响应。您的广告服务器还必须支持这些错误代码才能完全兼容。
+ **响应模式**-衡量表明容量问题的平台性能变化

重试行为会自动尝试投递长达 1 小时，两次尝试之间至少有 30 秒的延迟。无法配置此重试行为。

## 每秒信标流量管理
<a name="ad-reporting-server-side-tps-management"></a>

您可以设置 TPS 限制来控制信标传送速率。这是服务器端跟踪功能的唯一可配置设置。账户级别限制限制了向所有衡量合作伙伴发送的广告跟踪请求总数。 MediaTailor 强制执行 10,000 的最低 TPS 上限，以便为企业规模的运营提供足够的容量。

提交 AWS 支持请求以建立 TPS 限制，并提供以下信息：
+ **AWS 账户 ID**-您的特定账户标识符
+ **目标区域**-您想要应用 TPS 限制的 AWS 区域
+ **所需的 TPS 阈值**-您所需的每秒交易上限（最低 10,000）

默认情况下，没有 TPS 限制。如果您的广告决策服务器 (ADS) 需要，则可以申请 TPS 限制，但该限制必须大于 10,000 TPS。 MediaTailor 不会超过您的指定限制，但不能保证吞吐量始终如一，直至该限制。您的广告决策服务器会告诉您它可以支持哪些 TPS 限制。

## 按顺序信标
<a name="ad-reporting-server-side-in-order-beaconing"></a>

MediaTailor 自动保持广告跟踪事件的顺序投放。即使发生网络问题、重试或流量管理，系统也会保留信标顺序。这样可以确保衡量合作伙伴以正确的顺序接收事件，从而进行准确的分析。

该系统遵循标准的行业信标序列：

1. **开始事件**-在广告开始播放时触发

1. **第一个四分位数事件**-广告完成率为 25% 时开火

1. **中点事件**-广告完成 50% 时开火

1. **第三个四分位数事件——广告完成**率为 75% 时开火

1. **完成事件**-广告完成时触发

这些功能会自动协同工作：
+ 在节流期间会保持信标以保持正常秩序
+ 每个衡量合作伙伴域都有单独的事件队列，以防止费率调整期间出现中断
+ 重复数据删除可跟踪事件类型和时间轴位置，同时保持时间顺序

# 客户端广告跟踪
<a name="ad-reporting-client-side"></a>

使用 AWS Elemental MediaTailor 客户端跟踪 API，您可以在直播工作流程中加入广告时段的播放器控件。在客户端跟踪中，玩家或客户端向广告决策服务器 (ADS) 和其他广告验证实体发送跟踪事件，例如展示次数和四分位数广告信标。这些事件既跟踪整体广告中断状态，也跟踪每个广告间隔时间内的单个广告投放情况。有关展示次数和四分位数 (ADS) 以及其他广告验证实体的更多信息。有关展示次数和四分位数广告信标的更多信息，请参阅。[客户端信标](ad-reporting-client-side-beaconing.md)有关 ADS 和其他广告验证实体的更多信息，请参阅。[客户端广告跟踪集成](ad-reporting-client-side-ad-tracking-integrations.md)

有关将玩家参数和会话数据传递给 ADS 以进行客户端跟踪的信息，请参阅[MediaTailor ADS 请求的玩家变量](variables-player.md)和[MediaTailor ADS 请求的会话变量](variables-session.md)。

客户端跟踪支持以下功能：
+ 广告时段倒计时器-有关更多信息，请参阅。[广告倒计时器](ad-reporting-client-side-ad-tracking-schema-player-controls.md#ad-reporting-client-side-ad-tracking-schema-player-controls-ad-countdown-timer)
+ 广告点击量-有关更多信息，请参阅。[广告点击](ad-reporting-client-side-ad-tracking-schema-player-controls.md#ad-reporting-client-side-ad-tracking-schema-player-controls-ad-clickthrough)
+ 展示随播广告-有关更多信息，请参阅[配套广告](ad-reporting-client-side-ad-tracking-schema-player-controls.md#ad-reporting-client-side-ad-tracking-schema-player-controls-companion-ads)。
+ 可跳过的广告-有关更多信息，请参阅。[可跳过的广告](ad-reporting-client-side-ad-tracking-schema-player-controls.md#ad-reporting-client-side-ad-tracking-schema-player-controls-skippable-ads)
+ 显示 VAST 图标以实现隐私合规性-有关更多信息，请参阅[Google 的图标为什么是这个广告 (WTA)](ad-reporting-client-side-ad-tracking-schema-player-controls.md#ad-reporting-client-side-ad-tracking-schema-player-controls-google-wta)。
+ 控制广告期间玩家的擦洗-有关更多信息，请参阅[擦洗](ad-reporting-client-side-ad-tracking-schema-player-controls.md#ad-reporting-client-side-ad-tracking-schema-player-controls-scrubbing)。

使用 MediaTailor 客户端跟踪 API，除了客户端跟踪之外，您还可以将元数据发送到启用其他功能的播放设备：

## 客户端报告工作流程
<a name="ad-reporting-client-side-workflow"></a>

下图显示了从会话初始化到广告播放和信标设置的完整客户端报告工作流程：

![\[MediaTailor 客户端报告序列图，显示了从会话初始化到广告播放和信标的整个工作流程中，视频播放器、广告决策服务器、内容来源和广告验证服务之间的互动。 MediaTailor\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/tracking_flow.png)


客户端报告工作流程包括以下步骤：

1. **会话初始化**-视频播放器向会 MediaTailor 话端点发送 POST 请求，其中包含 JSON 元数据`adsParams`，包括原始令牌和会话功能。 MediaTailor 用`manifestUrl`和对会话`trackingUrl`进行响应。

1. **清单请求和广告决策**-玩家从中请求个性化清单 MediaTailor。 MediaTailor 从来源请求原始内容清单，使用玩家参数向广告决策服务器 (ADS) 发出广告请求，接收包含广告元数据的 VAST 响应，并向玩家提供带有广告标记的个性化清单。

1. **跟踪数据检索**-玩家定期轮询跟踪网址（匹配HLS的目标持续时间或达世币的最小更新周期）。 MediaTailor 返回 JSON 跟踪元数据，其中包含可用信息、广告、跟踪事件 URLs、信标和广告验证数据。

1. **广告播放和信标-在广告中断期间，玩家解析跟踪元数据，在广告开始呈现时触发曝光信标，在适当的时间发射四分**位数信标（开始、firstQuartile、midpoint、thirdQuartile、完成），必要时加载和执行广告验证，并将事件发送到第三方验证服务。 JavaScript viewability/verification 

1. **持续轮询**-玩家在整个会话中继续轮询跟踪网址，以接收有关即将推出的广告时段和动态内容的更新元数据。

此工作流程支持高级功能，例如广告倒计时计时器、点击功能、配套广告、可跳过的广告和符合隐私要求的 VAST 图标显示。

**Topics**
+ [客户端报告工作流程](#ad-reporting-client-side-workflow)
+ [启用客户端跟踪](#ad-reporting-client-side-enabling)
+ [广告服务器参数](#ad-reporting-client-side-ad-server-parameters)
+ [源站交互查询参数](#ad-reporting-client-side-origin-interaction-query-parameters)
+ [会话配置的功能](#ad-reporting-client-side-session-configured-features)
+ [客户端跟踪的最佳实践](#ad-reporting-client-side-best-practices)
+ [客户端广告跟踪架构和属性](ad-reporting-client-side-ad-tracking-schema.md)
+ [广告追踪活动时机](ad-reporting-client-side-ad-tracking-schema-activity-timing.md)
+ [用于客户端广告跟踪的玩家控制和功能](ad-reporting-client-side-ad-tracking-schema-player-controls.md)
+ [客户端信标](ad-reporting-client-side-beaconing.md)
+ [带有服务器端广告信标的混合模式](ad-reporting-hybrid-mode.md)
+ [客户端广告跟踪集成](ad-reporting-client-side-ad-tracking-integrations.md)
+ [通过广告信标进行寻呼 GetTracking](#gettracking)

## 启用客户端跟踪
<a name="ad-reporting-client-side-enabling"></a>

您可以为每个会话启用客户端跟踪。玩家`POST`向 MediaTailor 配置的会话初始化前缀端点创建 HTTP。或者，玩家可以发送其他元数据， MediaTailor 以便在进行广告调用、调用 Origin 获取清单以及在会话级别调用或禁用 MediaTailor功能时使用。

以下示例显示了 JSON 元数据的结构：

```
{
  "adsParams": {                  # 'adsParams' is case sensitive
    "param1": "value1",           # key is not case sensitive
    "param2": "value2",           # Values can contain spaces. For example, 'value 2' is an allowed value. 
    },
  "origin_access_token":"abc123", # this is an example of a query parameter designated for the origin
  "overlayAvails":"on"            # 'overlayAvails' is case sensitive. This is an example of a feature that is enabled at the session level.
}
```

使用 MediaTailor 控制台或 API 配置 ADS 请求模板网址以引用这些参数。在以下示例中，`player_params.param1`是的玩家参数`param1`，`player_params.param2`是的玩家参数`param2`。

```
https://my.ads.com/path?param1=[player_params.param1]&param2=[player_params.param2]
```

## 广告服务器参数
<a name="ad-reporting-client-side-ad-server-parameters"></a>

JSON 结构的最顶层是一个 JS `adsParams` ON 对象。该对象内部有 MediaTailor 可以读取所有会话请求并将其发送到广告服务器的 key/value 配对。 MediaTailor 支持以下广告服务器：
+ 谷歌广告管理器 
+ SpringServe 
+ FreeWheel 
+ Publica 

## 源站交互查询参数
<a name="ad-reporting-client-side-origin-interaction-query-parameters"></a>

JSON 结构最顶层中的任何保留 key/value 对（例如`adsParams``availSuppression``overlayAvails`、和）都不会以查询参数的形式添加到原始请求网址中。向源发出的 MediaTailor 每个会话清单请求都包含这些查询参数。Origin 会忽略多余的查询参数。例如， MediaTailor 可以使用 key/value 配对将访问令牌发送到源。

## 会话配置的功能
<a name="ad-reporting-client-side-session-configured-features"></a>

使用会话初始化 JSON 结构启用、禁用或覆盖诸如`overlayAvails``availSuppression`、和之类的 MediaTailor功能。`adSignaling`会话初始化期间传递的任何功能配置都会覆盖 MediaTailor 配置级别的设置。

**注意**  
 MediaTailor 在会话初始化时提交的元数据是不可变的，并且在会话期间无法添加其他元数据。使用 SCTE-35 标记来携带会话期间发生变化的数据。有关更多信息，请参阅 [MediaTailor ADS 请求的会话变量](variables-session.md)。

**Example : 为 HLS 执行客户端广告跟踪**  

```
POST mediatailorURL/v1/session/hashed-account-id/origin-id/asset-id.m3u8

        {
            "adsParams": {
               "deviceType": "ipad"   # This value does not change during the session.
               "uid": "abdgfdyei-2283004-ueu"                     
           }
        }
```

**Example : 对 DASH 执行客户端广告跟踪**  

```
POST mediatailorURL/v1/session/hashed-account-id/origin-id/asset-id.mpd

        {
            "adsParams": {
               "deviceType": "androidmobile",
               "uid": "xjhhddli-9189901-uic" 
           }
        }
```

### 报告模式参数
<a name="session-initialization-reporting-mode"></a>

在初始化会话时，您可以通过在请求正文中包含`reportingMode`参数来指定报告模式。此参数控制 MediaTailor 对会话执行客户端广告跟踪还是服务器端广告跟踪。
+ `client`-玩家执行广告跟踪并向广告服务器发送信标。如果未指定，则`reportingMode`这是默认模式。
+ `server`- MediaTailor 执行服务器端广告跟踪并将信标直接发送到广告服务器。

**Example 服务器端报告模式下的会话初始化**  

```
POST mediatailorURL/v1/session/hashed-account-id/origin-id/asset-id.m3u8

        {
            "adsParams": {
               "deviceType": "ipad",
               "uid": "abdgfdyei-2283004-ueu"                     
           },
           "reportingMode": "server"
        }
```

**Example 使用客户端报告模式进行会话初始化（显式）**  

```
POST mediatailorURL/v1/session/hashed-account-id/origin-id/asset-id.mpd

        {
            "adsParams": {
               "deviceType": "androidmobile",
               "uid": "xjhhddli-9189901-uic" 
           },
           "reportingMode": "client"
        }
```

**注意**  
该`reportingMode`参数是在会话初始化时设置的，不能在会话期间更改。如果未指定，`reportingMode`则 MediaTailor 默认为客户端报告以保持向后兼容性。

成功的响应是`200`带有响应正文的 HTTP。正文包含一个带有`manifestUrl`和`trackingUrl`密钥的 JSON 对象。这些值是玩家可用于播放和广告事件跟踪目的的相对 URLs 值。

```
{
  "manifestUrl": "/v1/dashmaster/hashed-account-id/origin-id/asset-id.m3u8?aws.sessionId=session-id",
  "trackingUrl": "/v1/tracking/hashed-account-id/origin-id/session-id"
}
```

有关客户端跟踪架构的更多信息，请参阅[客户端广告跟踪架构和属性](ad-reporting-client-side-ad-tracking-schema.md)。

## 客户端跟踪的最佳实践
<a name="ad-reporting-client-side-best-practices"></a>

本节概述了直播和 VOD MediaTailor 工作流程中客户端跟踪的最佳实践。

### 实时工作流程
<a name="ad-reporting-client-side-best-practices-live"></a>

按照与 HLS 的每个目标持续时间或 DASH 的最短更新周期相匹配的时间间隔对跟踪端点进行轮询，以便始终获得最新的广告跟踪元数据。在广告素材可能包含交互式或叠加组件的工作流程中，匹配此间隔尤其重要。

**注意**  
有些玩家支持事件监听器，这可以用作投票的替代方案。例如，需要为每个会话启用 MediaTailor 广告 ID 装饰功能。有关更多信息，请参阅 [广告 ID 装饰](ad-id-decoration.md)。使用此功能可以在每个广告上添加日期范围 (HLS) 或事件元素 (DASH) 标识符。玩家可以使用这些清单标签作为提示，为会话调用 MediaTailor跟踪端点。

### VOD 工作流程
<a name="ad-reporting-client-side-best-practices-vod"></a>

成功初始化会话后，在 MediaTailor 收到第一个包含媒体的清单后，您只需调用一次跟踪端点即可。

![\[VOD 工作流程的呼叫流程。在会话初始化并 MediaTailor 收到第一个包含媒体的清单后，调用客户端跟踪端点。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/vod-workflow-best-practice.png)


### 服务器引导的广告插入
<a name="ad-reporting-client-side-best-practices-sgai"></a>

服务器引导式广告插入 (SGAI) 会话不使用 API。`GetTracking`相反，当你使用时`aws.reportingMode=CLIENT`，当玩家请求广告内容时，会在每个素材资源列表响应的`TRACKING`部分 MediaTailor提供跟踪信息。会话初始化响应不包括`trackingUrl`。

客户端跟踪的 SGAI 会话的资产列表响应具有以下结构：

```
{
  "ASSETS": [
    { "DURATION": 20.0, "URI": "https://cdn.example.com/ad1/master.m3u8" },
    { "DURATION": 10.0, "URI": "https://cdn.example.com/ad2/master.m3u8" }
  ],
  "TRACKING": {
    ...VAST tracking events and beacon URLs for each ad...
  }
}
```

在 SGAI 方法实现客户端跟踪时：
+ 从资产列表响应中解析该`TRACKING`部分，而不是调用 `GetTracking`
+ 使用素材资源列表中 URLs 提供的跟踪信息来报告广告事件
+ 根据玩家中的实际广告播放事件发射追踪信标
+ 在获取素材资源列表时独立处理每个广告插播时间的跟踪

**重要**  
只有在设置后`aws.reportingMode=CLIENT`，该`TRACKING`部分才会包含在资产列表中。使用服务器端报告（SGAI 的默认设置）时，会省 MediaTailor 略该`TRACKING`栏目，改为在广告中嵌入信标数据。 URIs 有关更多信息，请参阅 [使用服务器引导广告插入 (SGAI) 进行服务器端跟踪](ad-reporting-server-side-sgai.md)。

# 客户端广告跟踪架构和属性
<a name="ad-reporting-client-side-ad-tracking-schema"></a>

借助 MediaTailor 客户端广告跟踪功能，您可以将详细的客户端广告跟踪数据集成到您的玩家环境中。以下各节涵盖了整个广告跟踪架构，以及构成该架构的特定属性和值。

## 架构
<a name="ad-reporting-client-side-ad-tracking-schema-table"></a>

以下 JSON 结构显示了 MediaTailor 客户端广告跟踪架构。此表示形式说明了架构的嵌套结构，可帮助您了解不同部分之间的关系。

有关每个属性的详细信息，请参阅[Properties](#ad-reporting-client-side-ad-tracking-schema-properties)。

```
{
  "avails": [
    {
      "ads": [
        {
          "adID": "string",
          "adParameters": "string",
          "adSystem": "string",
          "adTitle": "string",
          "adVerifications": [
            {
              "executableResource": [
                {
                  "apiFramework": "string",
                  "type": "string",
                  "uri": "string",
                  "language": "string"
                }
              ],
              "javaScriptResource": [
                {
                  "apiFramework": "string",
                  "browserOptional": "string",
                  "uri": "string"
                }
              ],
              "trackingEvents": [
                {
                  "event": "string",
                  "uri": "string"
                }
              ],
              "vendor": "string",
              "verificationParameters": "string"
            }
          ],
          "companionAds": [
            {
              "adParameters": "string",
              "altText": "string",
              "attributes": {
                "adSlotId": "string",
                "apiFramework": "string",
                "assetHeight": "string",
                "assetWidth": "string",
                "expandedHeight": "string",
                "expandedWidth": "string",
                "height": "string",
                "id": "string",
                "pxratio": "string",
                "renderingMode": "string",
                "width": "string"
              },
              "companionClickThrough": "string",
              "companionClickTracking": "string",
              "htmlResource": "string",
              "iFrameResource": "string",
              "sequence": "string",
              "staticResource": "string",
              "trackingEvents": [
                {
                  "event": "string",
                  "uri": "string"
                }
              ]
            }
          ],
          "creativeId": "string",
          "creativeSequence": "string",
          "duration": "string",
          "durationInSeconds": number,
          "extensions": [
            {
              "type": "string",
              "content": "string"
            }
          ],
          "icons": [
            {
              "attributes": {
                "apiFramework": "string",
                "duration": "string",
                "height": "string",
                "offset": "string",
                "program": "string",
                "pxratio": "string",
                "width": "string",
                "xPosition": "string",
                "yPosition": "string"
              },
              "htmlResource": "string",
              "iconClicks": {
                "iconClickThrough": "string",
                "iconClickTracking": {
                  "id": "string"
                },
                "iconClickFallbackImages": [
                  {
                    "altText": "string",
                    "height": "string",
                    "width": "string",
                    "staticResource": {
                      "creativeType": "string",
                      "uri": "string"
                    }
                  }
                ]
              },
              "iconViewTracking": "string",
              "iFrameResource": "string",
              "staticResource": {
                "creativeType": "string",
                "uri": "string"
              }
            }
          ],
          "mediaFiles": {
            "adParameters": "string",
            "duration": "string",
            "durationInSeconds": number,
            "mediaFilesList": [
              {
                "apiFramework": "string",
                "delivery": "string",
                "height": "string",
                "maintainAspectRatio": "string",
                "mediaFileUri": "string",
                "mediaType": "string",
                "scalable": "string",
                "width": "string",
                "bitrate": "string"
              }
            ],
            "mezzanine": "string",
            "startTime": "string",
            "startTimeInSeconds": number,
            "trackingEvents": [
              {
                "beaconUrls": ["string"],
                "duration": "string",
                "durationInSeconds": number,
                "dateTime": "string",
                "eventId": "string",
                "eventType": "string",
                "startTime": "string",
                "startTimeInSeconds": number
              }
            ]
          },
          "startTime": "string",
          "startTimeInSeconds": number,
          "dateTime": "string",
          "adBreakTrackingEvents": [...],
          "vastAdId": "string"
        }
      ],
      "adType": "string",
      "availID": "string",
      "duration": "string",
      "durationInSeconds": number,
      "startTime": "string",
      "startTimeInSeconds": number,
      "dateTime": "string",
      "adMarkerDuration": "string",
      "adProgramDateTime": "string",
      "dashAvailabilityStartTime": "string",
      "hlsAnchorMediaSequenceNumber": "string"
    }
  ],
  "nonLinearAvails": [
    {
      "nonLinearAds": [...],
      "nonLinearAdsList": [...]
    }
  ],
  "nextToken": "string",
  "meta": {}
}
```

## Properties
<a name="ad-reporting-client-side-ad-tracking-schema-properties"></a>

下表列出了客户端跟踪 API 中的属性及其定义、值类型和示例。


****  

| 属性 | 定义 | 值类型 | 示例 | 
| --- | --- | --- | --- | 
|   adID  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/ad-reporting-client-side-ad-tracking-schema.html) 路径：`/avails/ads/adId` VAST 映射：无  | 字符串 | 10 | 
|   adBreakTrackingEvents  |  一个数组，它承载来自 VAST 响应的 VMAP 跟踪事件。有关更多信息，请参阅 [VMAP 1.0](https://www.iab.com/guidelines/vmap/) 规范的第 2.3.3 节。 路径：`/avails/ads/adBreakTrackingEvents`  | 数组 |  []  | 
|   adMarkerDuration  |  从清单中的广告标记中观察到的有效时长。  | 字符串 |  30  | 
|   adParameters  |  一串来自 VAST VPAID 的广告参数， MediaTailor 传递给玩家。 路径：`/avails/ads/adParameters` 广阔的映射：`VAST/Ad/InLine/Creatives/Creative/Linear/AdParameters`  | 字符串 |  | 
|   adProgramDateTime  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/ad-reporting-client-side-ad-tracking-schema.html)  | 字符串 |  | 
|   ads  |  一个包含构成广告效果的广告对象的数组。广告按其在清单中的显示顺序列出。 路径：`/avails/ads`  | 数组 |  []  | 
|   adSystem  |  投放广告的系统的名称。  请务必提供一个值。如果您不提供值，则可能会出现问题。   | 字符串 |  myADS  | 
|   adTitle  |  广告的标题。  | 字符串 |  ad1  | 
|   adVerifications  |  包含执行第三方测量代码以验证创意播放所需的资源和元数据。有关此属性的更多信息，请参阅 V [AST 4.2 规范](https://iabtechlab.com/standards/vast/)的第 3.16 节。 MediaTailor 支持`adVerifications`作为 VAST 3 扩展节点。 路径：`/avails/ads/adVerifications` 广阔的映射：`VAST/Ad/InLine/AdVerifications`  | 数组 |  []  | 
|   altText  |  配套广告图片的替代文字。此文本允许为视障人士提供描述性音频支持的玩家回读对图像的描述。 路径：`/avails/ads/companionAds/altText`  | 字符串 |  video sequence advertising sneakers  | 
|   apiFramework  |  设置为`VPAID`，告诉玩家此广告是 VPAID 广告。 可以出现在架构中的多个位置。  | 字符串 |  VPAID  | 
|   availID  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/ad-reporting-client-side-ad-tracking-schema.html) 路径：`/avails/availID`  | 字符串 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/ad-reporting-client-side-ad-tracking-schema.html)  | 
|   avails  |  一个包含在活动清单窗口中显示的广告插*播对象或可用*对象的数组。这些可用按它们在清单中出现的顺序列出。 路径：`/avails`  | 数组 |  []  | 
|   adType  |  广告的类型。 路径：`/avails/adType`和 `/avails/ads/adType`  | 字符串 |  | 
|   dateTime  |  以 ISO 8601 秒格式编程广告或广告的开始日期时间。 路径：`/avails/dateTime`和 `/avails/ads/dateTime`  | 字符串 |  | 
|   duration  |  长度，采用 ISO 8601 秒格式。尽管信标持续时间始终为零，但响应包括整个广告投放时间以及每个广告和信标的持续时间。 路径：`/avails/duration`和 `/avails/ads/duration`  | 字符串 | 15.015 | 
|   durationInSeconds  |  长度，以秒为单位。 路径：`/avails/durationInSeconds`和 `/avails/ads/durationInSeconds`  | 数字 |  | 
|   extensions  |  广告服务器使用的 VAST 的自定义扩展程序。有关扩展的更多信息，请参阅 V [AST 4.2 规范](https://iabtechlab.com/standards/vast/)的第 3.18 节。 路径：`/avails/ads/extensions` 广阔的映射：`VAST/Ad/InLine/Extensions`  | 数组 | [] | 
|   icons  |  广告的图标元素。 路径：`/avails/ads/icons` 广阔的映射：`VAST/Ad/InLine/Creatives/Creative/Linear/Icons`  | 数组 |  | 
|   mediaFiles  |  玩家获得广告使用所需的视频和其他资产。 路径：`/avails/ads/mediaFiles`  | 对象 |  | 
|   nonLinearAvails  |  非线性广告可用对象数组。 路径：`/nonLinearAvails`  | 数组 |  | 
|   executableResource  |  用于验证的可执行资源。 路径：`/avails/ads/adVerifications/executableResource` 广阔的映射：`VAST/Ad/InLine/AdVerifications/Verification/ExecutableResource`  | 数组 |  | 
|   javaScriptResource  |  JavaScript 用于核查的资源。 路径：`/avails/ads/adVerifications/javaScriptResource` 广阔的映射：`VAST/Ad/InLine/AdVerifications/Verification/JavaScriptResource`  | 数组 |  | 
|   trackingEvents  |  跟踪验证广告或配套广告的事件。 路径：`/avails/ads/adVerifications/trackingEvents`或 `/avails/ads/companionAds/trackingEvents`  | 数组 |  | 
|   vendor  |  验证供应商。 路径：`/avails/ads/adVerifications/vendor` 广阔的映射：`VAST/Ad/InLine/AdVerifications/Verification/@vendor`  | 字符串 |  | 
|   uri  |  指向可执行资产、视频资产或跟踪端点的 URI。 路径：架构中的不同位置 VAST 映射：VAST 中的各种 CDATA 元素  | 字符串 | https://tracking.example.com/impression | 
|   verificationParameters  |  验证参数。 路径：`/avails/ads/adVerifications/verificationParameters` 广阔的映射：`VAST/Ad/InLine/AdVerifications/Verification/VerificationParameters`  | 字符串 |  | 
|   attributes  |  随播广告属性，例如尺寸和渲染模式。 路径：`/avails/ads/companionAds/attributes`  | 对象 |  | 
|   companionClickThrough  |  广告商页面的网址，当观众点击配套广告时，媒体播放器会打开该网址。 路径：`/avails/ads/companionAds/companionClickThrough` 广阔的映射：`VAST/Ad/InLine/Creatives/Creative/CompanionAds/Companion/CompanionClickThrough`  | 字符串 | https://aws.amazon.com/ | 
|   companionClickTracking  |  该`companionClickThrough`属性的追踪网址。 路径：`/avails/ads/companionAds/companionClickTracking` 广阔的映射：`VAST/Ad/InLine/Creatives/Creative/CompanionAds/Companion/CompanionClickTracking`  | 字符串 | https://myads.com/beaconing/event=clicktracking | 
|   htmlResource  |  直接插入到直播提供商的 HTML 页面中的 CDATA 编码的 HTML。 路径：`/avails/ads/companionAds/htmlResource` 广阔的映射：`VAST/Ad/InLine/Creatives/Creative/CompanionAds/Companion/HTMLResource`  | 字符串 | <\$1[CDATA[<\$1doctype html><html><head><meta name=\$1"viewport\$1" content=\$1"width=1, initial-scale=1.0, minimum-scale=1.0,...]]> | 
|   iFrameResource  |  直播提供商加载到 iframe 中的 HTML 资源文件的网址。 路径：`/avails/ads/companionAds/iFrameResource` 广阔的映射：`VAST/Ad/InLine/Creatives/Creative/CompanionAds/Companion/iFrameResource`  | 字符串 |  | 
|   sequence  |  在 VAST 响应中为广告素材指定的序列值。 路径：`/avails/ads/companionAds/sequence`  | 字符串 | 1 | 
|   startTime  |  时间位置，采用 ISO 8601 秒格式。对于 HLS 来说，这与播放会话的开始时间有关。对于 DASH，这与清单的 AST（可用性开始时间）相关。该响应包含整个广告效用以及每个广告和信标的开始时间。 路径：`/avails/startTime`和 `/avails/ads/startTime`  | 字符串 | PT18.581355S | 
|   startTimeInSeconds  |  时间位置，以秒为单位。对于 HLS 来说，这与播放会话的开始时间有关。对于 DASH，这与清单的 AST（可用性开始时间）相关。该响应包含整个广告效用以及每个广告和信标的开始时间。 路径：`/avails/startTimeInSeconds`和 `/avails/ads/startTimeInSeconds`  | 数字 | 18.581 | 
|   eventId  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/ad-reporting-client-side-ad-tracking-schema.html)  | 字符串 |  | 
|   event  |  追踪事件的名称。 路径：`/avails/ads/adVerifications/trackingEvents/event`或 `/avails/ads/companionAds/trackingEvents/event`  | 字符串 | impression, start, firstQuartile, midpoint, thirdQuartile, complete | 
|   beaconUrls  |   MediaTailor 发送广告信标的网址。 路径：`/avails/ads/mediaFiles/trackingEvents/beaconUrls`  | 数组 |  | 
|   bitrate  |  视频资源的比特率。可执行资源通常不包含此属性。  | 字符串 | 2048 | 
|   companionAds  |  一个或多个配套广告内容规范，每个规格都指定了要使用的资源文件。配套广告附带广告可用，并提供在视频附近显示的内容，例如广告周围的画框或横幅。 路径：`/avails/ads/companionAds`  | 数组 | [] | 
|   creativeId  |  广告`Creative`标签的`Id`属性值。  | 字符串 | creative-1 | 
|   creativeSequence  |  根据 VAST 响应中的`Ad@id`值，广告的播放顺序。  | 字符串 | 1 | 
|   dashAvailabilityStartTime  |  对于 live/dynamic DASH 来说，`MPD@availabilityStartTime`原产地是显而易见的。  | 字符串 | 2022-10-05T19:38:39.263Z | 
|   delivery  |  表示是否正在使用`progressive`或`streaming`协议。  | 字符串 | progressive | 
|   eventType  |  信标的类型。 路径：`/avails/ads/mediaFiles/trackingEvents/eventType`  | 字符串 | impression | 
|   height  |  视频资源的高度（以像素为单位）。  | 字符串 | 360 | 
|   hlsAnchorMediaSequenceNumber  |  在 HLS 源清单中看到的 first/oldest 媒体序列的媒体序列号。  | 字符串 | 77 | 
|   maintainAspectRatio  |  表示缩放时是否保持视频的纵横比。  | 布尔值 | true | 
|   mediaFilesList  |  指定玩家投放广告所需的视频和其他素材。 路径：`/avails/ads/mediaFiles/mediaFilesList`  | 数组 | [] | 
|   mediaFileUri  |  指向可执行资源或视频资源的 URI。  | 字符串 | https://myad.com/ad/ad134/vpaid.js | 
|   mediaType  |  广告素材或配套资源的 MIME 类型。  | 字符串 | video/mp4 | 
|   meta  |  广告的其他元数据。  | 对象 |  | 
|   mezzanine  |  夹层资产的网址，如果 VPAID 广告 MP4 包含夹层资产的网址，则指定。 路径：`/avails/ads/mediaFiles/mezzanine`  | 字符串 | https://gcdn.2mdn.net/videoplayback/id/itag/ck2/file/file.mp4 | 
|   nextToken  |  指向下一页结果的标记的值（如果存在这样的值）。  | 字符串 | UFQzOS44NzNTXzIwMjMtMDctMzFUMTY6NTA6MDYuMzUwNjI2ODQ1Wl8x | 
|   nonLinearAds  |  出现在视频内容旁边的非线性广告。  | 数组 | [] | 
|   nonLinearAdsList  |  非线性广告清单。  | 数组 | [] | 
|   scalable  |  指示是否将视频缩放到其他尺寸。  | 布尔值 | true | 
|   skipOffset  |  时间值，用于标识玩家何时向用户提供跳过控件。  | 字符串 | 00:00:05 | 
|   staticResource  |  用于广告组件的静态广告素材文件的网址。 路径：`/avails/ads/companionAds/staticResource`  | 字符串 | https://very-interactive-ads.com/campaign1/file.json?c=1019113602 | 
|   vastAdId  |  `Ad`标签的`Id`属性值。  | 字符串 | ad1 | 
|   width  |  视频资源的宽度（以像素为单位）。  | 字符串 | 640 | 
|   xPosition  |  图标在视频播放器中的水平位置。可以是特定的像素值，也可以是 “左” 或 “右” 之类的位置。 路径：`/avails/ads/icons/attributes/xPosition`  | 字符串 | left 或 10 | 
|   yPosition  |  图标在视频播放器中的垂直位置。可以是特定的像素值，也可以是 “顶部” 或 “底部” 之类的位置。 路径：`/avails/ads/icons/attributes/yPosition`  | 字符串 | top 或 10 | 
|   iconClicks  |  包含图标的点击和跟踪信息。 路径：`/avails/ads/icons/iconClicks`  | 对象 |  | 
|   iconClickThrough  |  广告商页面的网址，当观众点击该图标时，媒体播放器会打开该网址。 路径：`/avails/ads/icons/iconClicks/iconClickThrough`  | 字符串 | https://advertiser.com/landing-page | 
|   iconClickTracking  |  该`iconClickThrough`属性的追踪网址。 路径：`/avails/ads/icons/iconClicks/iconClickTracking`  | 对象 |  | 
|   iconClickFallbackImages  |  如果无法显示图标，则要显示的备用图像数组。 路径：`/avails/ads/icons/iconClicks/iconClickFallbackImages`  | 数组 |  | 
|   iconViewTracking  |  查看图标时用于跟踪的网址。 路径：`/avails/ads/icons/iconViewTracking`  | 字符串 | https://tracking.example.com/icon-view | 
|   offset  |  广告播放期间图标何时应出现的时间偏移。 路径：`/avails/ads/icons/attributes/offset`  | 字符串 | 00:00:05 | 
|   program  |  与该图标关联的计划或计划，例如 “AdChoices”。 路径：`/avails/ads/icons/attributes/program`  | 字符串 | AdChoices | 
|   pxratio  |  图标或配套广告的像素比例，用于高 DPI 显示屏。 路径：`/avails/ads/icons/attributes/pxratio`或 `/avails/ads/companionAds/attributes/pxratio`  | 字符串 | 1 或 2 | 
|   type  |  资源或扩展的类型。 路径：`/avails/ads/extensions/type`或 `/avails/ads/adVerifications/executableResource/type`  | 字符串 | text/javascript | 
|   content  |  扩展程序的内容。 路径：`/avails/ads/extensions/content`  | 字符串 |  | 
|   language  |  可执行资源的编程语言。 路径：`/avails/ads/adVerifications/executableResource/language`  | 字符串 | javascript | 
|   browserOptional  |  表示 JavaScript 资源是否需要浏览器支持。 路径：`/avails/ads/adVerifications/javaScriptResource/browserOptional`  | 字符串 | true 或 false | 
|   id  |  架构中各种元素的标识符。 路径：`/avails/ads/companionAds/attributes/id`或 `/avails/ads/icons/iconClicks/iconClickTracking/id`  | 字符串 | companion-1 | 
|   assetHeight  |  配套广告素材资源的高度。 路径：`/avails/ads/companionAds/attributes/assetHeight`  | 字符串 | 250 | 
|   assetWidth  |  配套广告素材资源的宽度。 路径：`/avails/ads/companionAds/attributes/assetWidth`  | 字符串 | 300 | 
|   expandedHeight  |  展开后配套广告的高度。 路径：`/avails/ads/companionAds/attributes/expandedHeight`  | 字符串 | 600 | 
|   expandedWidth  |  随播广告展开后的宽度。 路径：`/avails/ads/companionAds/attributes/expandedWidth`  | 字符串 | 600 | 
|   renderingMode  |  配套广告的渲染模式。 路径：`/avails/ads/companionAds/attributes/renderingMode`  | 字符串 | default 或 transparent | 
|   adSlotId  |  应在其中展示配套广告的广告位的 ID。 路径：`/avails/ads/companionAds/attributes/adSlotId`  | 字符串 | banner-1 | 
|   creativeType  |  创意资源的 MIME 类型。 路径：`/avails/ads/icons/staticResource/creativeType`  | 字符串 | image/png | 

# 广告追踪活动时机
<a name="ad-reporting-client-side-ad-tracking-schema-activity-timing"></a>

在客户端报告中，玩家必须精确地发出跟踪事件（信标）。使用 MediaTailor 客户端跟踪架构，您可以确保每种可用性、广告、配套事件、叠加层事件和跟踪事件、时间和持续时间信息均以不同的形式存在。

使用以下 MediaTailor 键/值对让玩家准确协调广告事件活动（例如跟踪事件）和播放位置：
+ [startTime](ad-reporting-client-side-ad-tracking-schema.md#property-starttime) 
+  [startTimeInSeconds](ad-reporting-client-side-ad-tracking-schema.md#property-starttimeinseconds) 
+  [adProgramDateTime](ad-reporting-client-side-ad-tracking-schema.md#property-adprogramdatetime) 
+  [adID](ad-reporting-client-side-ad-tracking-schema.md#property-adid)/[eventId](ad-reporting-client-side-ad-tracking-schema.md#property-eventid) 

HLS 和 DASH 以`startTimeInSeconds`不同的方式实现`startTime`和的价值：
+ HLS-这些`startTime`值是相对于播放会话开始时间的。播放会话的开始时间定义为零时间。广告`startTime`是有效期之前所有`EXT-INF`细分持续时间的累积值的总和。广告或跟踪事件所在区段的媒体序列号也对应于客户端跟踪`eventId`响应中的`adId`或。
+ DASH：
  + 实时/动态清单-这些`startTime`值是相对于 DASH 清单`MPD@availabilityStartTime`的值。`MPD@avaibilityStartTime`是所有消耗直播的 MediaTailor 会话的计时锚点。
  + VOD/Static 清单-这些`startTime`值是相对于播放会话开始时间的。播放会话的开始时间定义为零时间。Avail中的每个广告都包含在自己的`Period`元素中。该`Period`元素的`@start`属性值与客户端跟踪负载中的`startTime`值相同。`PeriodId`也对应于客户端跟踪响应`eventId`中的`adId`或。

**Example HLS：**  
在以下示例中， MediaTailor 会话已启动，以下清单是第一个提供给客户端的清单：  

```
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:4603263
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:23.295678Z
#EXTINF:4.010667,
https://123.cloudfront.net/out/v1/index_1_34.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:27.306345Z
#EXTINF:4.010667,
https://123.cloudfront.net/out/v1/index_1_35.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:31.317012Z
#EXTINF:4.010667,
https://123.cloudfront.net/out/v1/index_1_36.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:35.327679Z
#EXTINF:4.010667,
https://123.cloudfront.net/out/v1/index_1_37.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:39.338346Z
#EXTINF:2.538667,
https://123.cloudfront.net/out/v1/index_1_38.ts
#EXT-X-DISCONTINUITY
#EXT-X-KEY:METHOD=NONE
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:41.453Z
#EXTINF:2.0,
https://123.cloudfront.net/tm/asset_1080_4_8_00001.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:43.453Z
#EXTINF:2.0,
https://123.cloudfront.net/tm/asset_1080_4_8_00002.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-03T21:24:45.453Z
#EXTINF:2.0,
https://123.cloudfront.net/tm/asset_1080_4_8_00003.ts
```
在客户端跟踪 JSON 负载中，以下值适用：  
+  `startTime`: `"PT18.581355S"` 
+  `startTimeInSeconds`: `18.581` 
+  `availProgramDateTime`: `"2023-05-03T21:24:41.453Z"` 
+  `adId`: `4603269` 

**Example DASH：**  
在以下示例中，会 MediaTailor 话在清单中获得中间滚动。请注意，第二个时段（即广告时段）的`@start`属性值具有相对于该`MPD@availabilityStartTime`值的值。此值是 MediaTailor 写入所有会话的客户端跟踪响应`startTime`字段的值。  

```
<?xml version="1.0" encoding="UTF-8"?>
<MPD availabilityStartTime="2022-10-05T19:38:39.263Z" minBufferTime="PT10S" minimumUpdatePeriod="PT2S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2023-05-03T22:06:48.411Z" suggestedPresentationDelay="PT10S" timeShiftBufferDepth="PT1M30S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:scte35="urn:scte:scte35:2013:xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd">
    <BaseURL>https://123.channel-assembly.mediatailor.us-west-2.amazonaws.com/v1/channel/my-channel/</BaseURL>
    <Location>https://123.cloudfront.net/v1/dash/94063eadf7d8c56e9e2edd84fdf897826a70d0df/MediaTailor-Live-HLS-DASH/channel/channel1/dash.mpd?aws.sessionId=794a15e0-2a7f-4941-a537-9d71627984e5</Location>
    <Period id="1683151479166_1" start="PT5042H25M59.903S" xmlns="urn:mpeg:dash:schema:mpd:2011">
        <BaseURL>https://123.cloudfront.net/out/v1/f1a946be8efa45b0931ea35c9055fb74/ddb73bf548a44551a0059c346226445a/eaa5485198bf497284559efb8172425e/</BaseURL>
        <AdaptationSet ...>
            ...
        </AdaptationSet>
    </Period>
    <Period id="1683151599194_1_1" start="PT5042H27M59.931S">
        <BaseURL>https://123.cloudfront.net/tm/94063eadf7d8c56e9e2edd84fdf897826a70d0df/fpc5omz5wzd2rdepgieibp23ybyqyrme/</BaseURL>
        <AdaptationSet ...>
            ...
        </AdaptationSet>
    </Period>
</MPD>
```
在客户端跟踪 JSON 负载中，以下值适用：  
+  `startTime`: `"PT5042H27M59.931S"` 
+  `startTimeInSeconds`: `18152879.931` 
+  `availProgramDateTime`: *null* 
+  `adId`: `1683151599194_1_1` 

# 用于客户端广告跟踪的玩家控制和功能
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls"></a>

MediaTailor 客户端跟踪元数据支持各种玩家控件和功能。以下列表描述了常用的播放器控件。

**Topics**
+ [擦洗](#ad-reporting-client-side-ad-tracking-schema-player-controls-scrubbing)
+ [广告倒计时器](#ad-reporting-client-side-ad-tracking-schema-player-controls-ad-countdown-timer)
+ [可跳过的广告](#ad-reporting-client-side-ad-tracking-schema-player-controls-skippable-ads)
+ [广告点击](#ad-reporting-client-side-ad-tracking-schema-player-controls-ad-clickthrough)
+ [配套广告](#ad-reporting-client-side-ad-tracking-schema-player-controls-companion-ads)
+ [互动广告 (SIMID)](#ad-reporting-client-side-ad-tracking-schema-player-controls-simid-ads)
+ [互动广告（VPAID）](#ad-reporting-client-side-ad-tracking-schema-player-controls-vpaid-ads)
+ [Google 的图标为什么是这个广告 (WTA)](#ad-reporting-client-side-ad-tracking-schema-player-controls-google-wta)

## 擦洗
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-scrubbing"></a>

为了增强播放体验，播放器可以在播放时间轴中显示广告位置。 MediaTailor 在客户端跟踪响应中以`startTimeInSeconds`值的形式显示这些广告位置。

**注意**  
一些流媒体提供商会阻止用户越过广告位置。

![\[屏幕截图显示了视频时间轴中广告播放位置的 MediaTailor 标记位置。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/scrubbing.png)


以下客户端跟踪负载 JSON 响应显示了 avails 数组的根 JSON 对象内的可用性（广告中断）开始时间。玩家使用此数据在玩家时间轴上显示广告时段的位置，时间为 28 秒。

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [...],
      "availId": "7",
      "availProgramDateTime": null,
      "duration": "PT30S",
      "durationInSeconds": 30,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT28S",
      "startTimeInSeconds": 28
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQxMk0zNC44NjhTXzIwMjMtMDctMjFUMjA6MjM6MDcuNzc1NzE2MzAyWl8x",
  "nonLinearAvails": []
}
```

## 广告倒计时器
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-ad-countdown-timer"></a>

借助广告倒计时器， MediaTailor 您可以使用广告倒计时器来帮助您的受众在广告时段观看期间保持参与度。受众可以使用计时器来了解广告时段何时结束以及他们的节目何时恢复。

![\[屏幕截图 MediaTailor 显示了广告倒计时器，该计时器告诉受众距离节目恢复还有多长时间。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ad-countdown-timer.png)


客户端跟踪元数据中在广告倒计时器中起作用的元素是`startTime`、`startTimeInSeconds``duration`、和`durationInSeconds`。玩家使用此元数据以及单独跟踪的会话经过的时间，来确定何时显示计时器以及计时器应从哪个值开始倒计时。

以下客户端跟踪负载 JSON 响应显示了显示广告倒计时器所需的信息。

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [...],
      "availId": "7",
      "availProgramDateTime": null,
      "duration": "PT30S",
      "durationInSeconds": 30,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT28S",
      "startTimeInSeconds": 28
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQxMk0zNC44NjhTXzIwMjMtMDctMjFUMjA6MjM6MDcuNzc1NzE2MzAyWl8x",
  "nonLinearAvails": []
}
```

当会话的经过时间达到可用性的开始时间时，玩家会显示一个倒数计时器，其值与该任务的持续时间相匹配。倒计时计时器值随着经过的时间超出可用性的开始时间而减小。

**Example 公式：HLS（直播和 VOD）和 DASH（VOD）的倒计时器**  
+ `session_start_time`= 所有`EXT-INF`时长值的总和-三个最新`EXT-INF`媒体序列的时长值
+ 计时器值 = `duration`-(`session_elapsed_time`-`startTime`)

![\[该图显示了 HLS（直播和 VOD）和 DASH（VOD）清单的广告倒计时器的计算结果，该计时器基于会话的开始时间和 avail 的开始时间。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ad-countdown-timer-hls-dash-vod.png)


**Example 公式：DASH 的倒计时器（直播）**  
+ `session_start_time`=（最新片段 `startTime` \$1`duration`）/`timescale`-`MPD@suggestedPresentationDelay`
+ 计时器值 = `duration`-(`session_elapsed_time`-`startTime`)

![\[该图显示了基于会话开始时间和 avail's 开始时间计算的直播 DASH 清单的广告倒计时器。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ad-countdown-timer-dash-live.png)


## 可跳过的广告
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-skippable-ads"></a>

*可跳过的广告*是允许观众跳过部分广告以继续观看节目的广告位。在 VAST 中，该`Linear@skipOffset`属性用于标识可跳过的广告。

以下 VAST 响应显示了如何使用可跳过的广告：

```
<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
  <Ad>
    <InLine>
      ...
      <Creatives>
        <Creative id="1" sequence="1">
          <Linear skipoffset="00:00:05">
            <Duration>00:00:15</Duration>
            <MediaFiles>
              <MediaFile id="EMT" delivery="progressive" width="640" height="360" type="video/mp4" bitrate="143" scalable="true" maintainAspectRatio="true"><![CDATA[https://ads.com/file.mp4]]></MediaFile>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
      ...
    </InLine>
  </Ad>
</VAST>
```

以下客户端跟踪负载 JSON 响应显示了`ads`数组内的广告元数据。该数组包含从 VAST 响应中 MediaTailor获得的`skipOffset`值。

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "1",
          "adParameters": "",
          "adProgramDateTime": "2023-07-31T16:11:40.693Z",
          "adSystem": "2.0",
          "adTitle": "AD-skiing-15",
          "adVerifications": [],
          "companionAds": [...],
          "creativeId": "1",
          "creativeSequence": "1",
          "duration": "PT15.015S",
          "durationInSeconds": 15.015,
          "extensions": [],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "skipOffset": "00:00:05",
          "startTime": "PT9.943S",
          "startTimeInSeconds": 9.943,
          "trackingEvents": [
            {
              "beaconUrls": [
                "https://adserverbeaconing.com/v1/impression"
              ],
              "duration": "PT15.015S",
              "durationInSeconds": 15.015,
              "eventId": "2697726",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT9.943S",
              "startTimeInSeconds": 9.943
            }
          ],
          "vastAdId": ""
        }
      ],
      "availId": "2697726",
      "availProgramDateTime": "2023-07-31T16:11:40.693Z",
      "duration": "PT15.015S",
      "durationInSeconds": 15.015,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT9.943S",
      "startTimeInSeconds": 9.943
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "",
  "nonLinearAvails": []
}
```

## 广告点击
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-ad-clickthrough"></a>

点击可 URIs 让广告商衡量广告在吸引观众注意力方面的成功程度。在观看者点击正在进行的广告的有效视频帧后，网络浏览器会打开广告主主页或广告系列登录页面的 URI。玩家开发者决定点击行为，例如将按钮或标签叠加在广告视频上，并附上需要点击的消息，以了解更多信息。玩家开发者通常会在观众点击当前视频帧后暂停广告的视频。

![\[视频播放器中广告点击的屏幕截图。观看者点击视频画面。玩家暂停视频，然后打开网络浏览器，将观看者带到广告商的主页或广告活动登录页面。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/ad-clickthrough.png)


MediaTailor 可以解析并提供 VAST 响应中 URLs 返回的任何线性视频点击事件。以下 VAST 响应显示了广告点击示例。

```
<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
  <Ad>
    <InLine>
      ...
      <Creatives>
        <Creative id="1" sequence="1">
          <Linear>
            <Duration>00:00:15</Duration>
            <MediaFiles>
              <MediaFile id="EMT" delivery="progressive" width="1280" height="720" type="video/mp4" bitrate="143" scalable="true" maintainAspectRatio="true"><![CDATA[https://ads.com/file.mp4]]></MediaFile>
            </MediaFiles>
            <VideoClicks>
              <ClickThrough id="EMT"><![CDATA[https://aws.amazon.com]]></ClickThrough>
              <ClickTracking id="EMT"><![CDATA[https://myads.com/beaconing/event=clicktracking]]></ClickTracking>
            </VideoClicks>
          </Linear>
        </Creative>
      </Creatives>
      ...
    </InLine>
  </Ad>
</VAST>
```

以下客户端跟踪负载 JSON 响应显示了如何在 MediaTailor 数组中显示点击和点击 URLs 跟踪。`trackingEvents``clickThrough`事件类型代表点击广告，`clickTracking`事件类型代表点击跟踪网址。

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "1",
          "adParameters": "",
          "adProgramDateTime": "2023-07-31T16:53:40.577Z",
          "adSystem": "2.0",
          "adTitle": "1",
          "adVerifications": [],
          "companionAds": [],
          "creativeId": "00006",
          "creativeSequence": "1",
          "duration": "PT14.982S",
          "durationInSeconds": 14.982,
          "extensions": [],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "skipOffset": null,
          "startTime": "PT39.339S",
          "startTimeInSeconds": 39.339,
          "trackingEvents": [
            {
              "beaconUrls": [
                "https://myads.com/beaconing/event=impression"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698188",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            },
            {
              "beaconUrls": [
                "https://aws.amazon.com"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698188",
              "eventProgramDateTime": null,
              "eventType": "clickThrough",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            },
            {
              "beaconUrls": [
                "https://myads.com/beaconing/event=clicktracking"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698795",
              "eventProgramDateTime": null,
              "eventType": "clickTracking",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            }
          ],
          "vastAdId": ""
        }
      ],
      "availId": "2698188",
      "availProgramDateTime": "2023-07-31T16:53:40.577Z",
      "duration": "PT14.982S",
      "durationInSeconds": 14.982,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT39.339S",
      "startTimeInSeconds": 39.339
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQzOS4zMzlTXzIwMjMtMDctMzFUMTY6NTQ6MDQuODA1Mzk2NTI5Wl8x",
  "nonLinearAvails": []
}
```

## 配套广告
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-companion-ads"></a>

配*套广告*与线性广告一起显示。使用配套广告通过展示产品、徽标和品牌信息来提高广告位的有效性。展示广告可以包含快速响应 (QR) 码和可点击区域，以提高受众的参与度。

MediaTailor 在 VAST 响应中支持配套广告。它可以分别传递来自`StaticResource``iFrameResource`、和`HTMLResource`节点的元数据。

以下 VAST 响应显示了线性广告和配套广告的位置和格式示例。

```
<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
  <Ad>
    <InLine>
      ...
      <Creatives>
        <Creative id="1" sequence="1">
          <Linear>
            <Duration>00:00:10</Duration>
            <MediaFiles>
              <MediaFile id="EMT" delivery="progressive" width="640" height="360" type="video/mp4" bitrate="143" scalable="true" maintainAspectRatio="true"><![CDATA[https://ads.com/file.mp4]]></MediaFile>
            </MediaFiles>
          </Linear>
        </Creative>
        <Creative id="2" sequence="1">
          <CompanionAds>
            <Companion id="2" width="300" height="250">
              <StaticResource creativeType="image/png"><![CDATA[https://emt.com/companion/9973499273]]></StaticResource>
              <TrackingEvents>
                <Tracking event="creativeView"><![CDATA[https://beacon.com/1]]></Tracking>
              </TrackingEvents>
              <CompanionClickThrough><![CDATA[https://beacon.com/2]]></CompanionClickThrough>
            </Companion>
            <Companion id="3" width="728" height="90">
              <StaticResource creativeType="image/png"><![CDATA[https://emt.com/companion/1238901823]]></StaticResource>
              <TrackingEvents>
                <Tracking event="creativeView"><![CDATA[https://beacon.com/3]]></Tracking>
              </TrackingEvents>
              <CompanionClickThrough><![CDATA[https://beacon.com/4]]></CompanionClickThrough>
            </Companion>
          </CompanionAds>
        </Creative>
      </Creatives>
      ...
    </InLine>
  </Ad>
</VAST>
```

数据显示在`/avail/x/ads/y/companionAds`列表中的客户端跟踪响应中。每个线性广告最多可以包含 6 个配套广告。如下例所示，随播广告显示在列表中

**注意**  
作为最佳实践，应用程序开发者应实现逻辑，以便在广告素材结尾处明确移除或卸载配套广告。

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "0",
          "adParameters": "",
          "adProgramDateTime": null,
          "adSystem": "EMT",
          "adTitle": "sample",
          "adVerifications": [],
          "companionAds": [
            {
              "adParameters": null,
              "altText": null,
              "attributes": {
                "adSlotId": null,
                "apiFramework": null,
                "assetHeight": null,
                "assetWidth": null,
                "expandedHeight": null,
                "expandedWidth": null,
                "height": "250",
                "id": "2",
                "pxratio": null,
                "renderingMode": null,
                "width": "300"
              },
              "companionClickThrough": "https://beacon.com/2",  
              "companionClickTracking": null,
              "htmlResource": null,
              "iFrameResource": null,
              "sequence": "1",
              "staticResource": "https://emt.com/companion/9973499273",
              "trackingEvents": [
                {
                  "beaconUrls": [
                    "https://beacon.com/1"
                  ],
                  "eventType": "creativeView"
                }
              ]
            },
            {
              "adParameters": null,
              "altText": null,
              "attributes": {
                "adSlotId": null,
                "apiFramework": null,
                "assetHeight": null,
                "assetWidth": null,
                "expandedHeight": null,
                "expandedWidth": null,
                "height": "90",
                "id": "3",
                "pxratio": null,
                "renderingMode": null,
                "width": "728"
              },
              "companionClickThrough": "https://beacon.com/4",
              "companionClickTracking": null,
              "htmlResource": null,
              "iFrameResource": null,
              "sequence": "1",
              "staticResource": "https://emt.com/companion/1238901823",
              "trackingEvents": [
                {
                  "beaconUrls": [
                    "https://beacon.com/3"
                  ],
                  "eventType": "creativeView"
                }
              ]
            }
          ],
          "creativeId": "1",
          "creativeSequence": "1",
          "duration": "PT10S",
          "durationInSeconds": 10,
          "extensions": [],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "skipOffset": null,
          "startTime": "PT0S",
          "startTimeInSeconds": 0,
          "trackingEvents": [
            {
              "beaconUrls": [
                "https://beacon.com/impression/1"
              ],
              "duration": "PT10S",
              "durationInSeconds": 10,
              "eventId": "0",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT0S",
              "startTimeInSeconds": 0
            }
          ],
          "vastAdId": ""
        }
      ],
      "availId": "0",
      "availProgramDateTime": null,
      "duration": "PT10S",
      "durationInSeconds": 10,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT0S",
      "startTimeInSeconds": 0
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQxMFNfMjAyMy0wNy0wNlQyMToxMDowOC42NzQ4NDA1NjJaXzE%3D",
  "nonLinearAvails": []
}
```

## 互动广告 (SIMID)
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-simid-ads"></a>

*SecureInteractive 媒体接口定义* (SIMID) 是互动广告管理局 (IAB) 在 VAST 4.x 标准中引入的互动广告标准。SIMID 将互动元素的加载与播放器上的主要线性素材分开，在 VAST 响应中同时引用了这两者。 MediaTailor 在主素材中缝合以保持播放体验，并将交互组件的元数据放在客户端的跟踪响应中。

在以下 VAST 4 响应示例中，SIMID 有效负载位于`InteractiveCreativeFile`节点内部。

```
<?xml version="1.0"?>
<VAST xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
  <Ad id="1234567">
    <InLine>
      <AdSystem>SampleAdSystem</AdSystem>
      <AdTitle>Linear SIMID Example</AdTitle>
      <Description>SIMID example</Description>
      <Error>https://www.beacons.com/error</Error>
      <Impression>https://www.beacons.com/impression</Impression>
      <Creatives>
        <Creative sequence="1">
          <Linear>
            <Duration>00:00:15</Duration>
            <TrackingEvents>
                ...
            </TrackingEvents>
            <VideoClicks>
              <ClickThrough id="123">https://aws.amazon.com</ClickThrough>
              <ClickTracking id="123">https://www.beacons.com/click</ClickTracking>
            </VideoClicks>
            <MediaFiles>
              <MediaFile delivery="progressive" type="video/mp4">
                                https://interactive-ads.com/interactive-media-ad-sample/media/file.mp4
                            </MediaFile>
              <InteractiveCreativeFile type="text/html" apiFramework="SIMID" variableDuration="true">
                                https://interactive-ads.com/interactive-media-ad-sample/sample_simid.html
                            </InteractiveCreativeFile>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
    </InLine>
  </Ad>
</VAST>
```

在以下 VAST 3 响应中，SIMID 有效载荷位于`Extensions`节点内部。

```
<?xml version="1.0"?>
<VAST xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
  <Ad id="1234567">
    <InLine>
      <AdSystem>SampleAdSystem</AdSystem>
      <AdTitle>Linear SIMID Example</AdTitle>
      <Description>SIMID example</Description>
      <Impression>https://www.beacons.com/impression</Impression>
      <Creatives>
        <Creative id="1" sequence="1">
          <Linear>
            <Duration>00:00:15</Duration>
            <TrackingEvents>
                ...
            </TrackingEvents>
            <VideoClicks>
              <ClickThrough id="123">https://aws.amazon.com</ClickThrough>
              <ClickTracking id="123">https://myads.com/beaconing/event=clicktracking</ClickTracking>
            </VideoClicks>
            <MediaFiles>
              <MediaFile delivery="progressive" type="video/mp4">
                                https://interactive-ads.com/interactive-media-ad-sample/media/file.mp4
                            </MediaFile>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
      <Extensions>
        <Extension type="InteractiveCreativeFile">
          <InteractiveCreativeFile type="text/html" apiFramework="SIMID" variableDuration="true">
            https://interactive-ads.com/interactive-media-ad-sample/sample_simid.html
          </InteractiveCreativeFile>
        </Extension>
      </Extensions>
    </InLine>
  </Ad>
</VAST>
```

在以下客户端跟踪响应中，SIMID 数据显示在列表中。`/avails/x/ads/y/extensions`

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "1",
          "adParameters": "",
          "adProgramDateTime": "2023-07-31T16:53:40.577Z",
          "adSystem": "2.0",
          "adTitle": "Linear SIMID Example",
          "adVerifications": [],
          "companionAds": [],
          "creativeId": "1",
          "creativeSequence": "1",
          "duration": "PT14.982S",
          "durationInSeconds": 14.982,
          "extensions": [
            {
              "content": "<InteractiveCreativeFile type=\"text/html\" apiFramework=\"SIMID\" variableDuration=\"true\">\nhttps://interactive-ads.com/interactive-media-ad-sample/sample_simid.html</InteractiveCreativeFile>",
              "type": "InteractiveCreativeFile"
            }
          ],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "skipOffset": null,
          "startTime": "PT39.339S",
          "startTimeInSeconds": 39.339,
          "trackingEvents": [
            {
              "beaconUrls": [
                "https://myads.com/beaconing/event=impression"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698188",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            },
            {
              "beaconUrls": [
                "https://aws.amazon.com"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698188",
              "eventProgramDateTime": null,
              "eventType": "clickThrough",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            },
            {
              "beaconUrls": [
                "https://myads.com/beaconing/event=clicktracking"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698795",
              "eventProgramDateTime": null,
              "eventType": "clickTracking",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            }
          ],
          "vastAdId": ""
        }
      ],
      "availId": "2698188",
      "availProgramDateTime": "2023-07-31T16:53:40.577Z",
      "duration": "PT14.982S",
      "durationInSeconds": 14.982,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT39.339S",
      "startTimeInSeconds": 39.339
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQzOS4zMzlTXzIwMjMtMDctMzFUMTY6NTQ6MDQuODA1Mzk2NTI5Wl8x",
  "nonLinearAvails": []
}
```

## 互动广告（VPAID）
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-vpaid-ads"></a>

*视频播放器广告界面定义* (VPAID) 规定了广告和视频播放器之间支持广告互动和其他功能的协议。对于直播， MediaTailor 支持 VPAID 格式，方法是在可用期间拼接标题片段，然后在视频播放器使用的客户端跟踪响应中放置 VPAID 广告素材的元数据。玩家下载 VPAID 文件并播放线性广告素材并执行客户端的脚本。玩家永远*不*应该玩 slate 片段。

**注意**  
从 VAST 4.1 起，VPAID 已被弃用。

![\[VPAID 广告播放示意图。 MediaTailor 在内容时间轴中为可用时长拼接板片段。玩家在有效期内切换到 VPAID 资产。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/interactive-ads-vpaid.png)


以下示例显示了 VAST 响应中的 VPAID 内容。

```
<?xml version="1.0"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
  <Ad id="1234567">
    <InLine>
      <AdSystem>GDFP</AdSystem>
      <AdTitle>VPAID</AdTitle>
      <Description>Vpaid Linear Video Ad</Description>
      <Error>http://www.example.com/error</Error>
      <Impression>http://www.example.com/impression</Impression>
      <Creatives>
        <Creative sequence="1">
          <Linear>
            <Duration>00:00:00</Duration>
            <TrackingEvents>
              <Tracking event="start">http://www.example.com/start</Tracking>
              <Tracking event="firstQuartile">http://www.example.com/firstQuartile</Tracking>
              <Tracking event="midpoint">http://www.example.com/midpoint</Tracking>
              <Tracking event="thirdQuartile">http://www.example.com/thirdQuartile</Tracking>
              <Tracking event="complete">http://www.example.com/complete</Tracking>
              <Tracking event="mute">http://www.example.com/mute</Tracking>
              <Tracking event="unmute">http://www.example.com/unmute</Tracking>
              <Tracking event="rewind">http://www.example.com/rewind</Tracking>
              <Tracking event="pause">http://www.example.com/pause</Tracking>
              <Tracking event="resume">http://www.example.com/resume</Tracking>
              <Tracking event="fullscreen">http://www.example.com/fullscreen</Tracking>
              <Tracking event="creativeView">http://www.example.com/creativeView</Tracking>
              <Tracking event="acceptInvitation">http://www.example.com/acceptInvitation</Tracking>
            </TrackingEvents>
            <AdParameters><![CDATA[ {"videos":[ {"url":"https://my-ads.com/interactive-media-ads/media/media_linear_VPAID.mp4","mimetype":"video/mp4"}]} ]]></AdParameters>
            <VideoClicks>
              <ClickThrough id="123">http://google.com</ClickThrough>
              <ClickTracking id="123">http://www.example.com/click</ClickTracking>
            </VideoClicks>
            <MediaFiles>
              <MediaFile delivery="progressive" apiFramework="VPAID" type="application/javascript" width="640" height="480"> https://googleads.github.io/googleads-ima-html5/vpaid/linear/VpaidVideoAd.js </MediaFile>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
    </InLine>
  </Ad>
</VAST>
```

以下示例显示了追踪信息。

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "1",
          "adParameters": "",
          "adProgramDateTime": "2023-07-31T16:53:40.577Z",
          "adSystem": "2.0",
          "adTitle": "1",
          "adVerifications": [],
          "companionAds": [],
          "creativeId": "00006",
          "creativeSequence": "1",
          "duration": "PT14.982S",
          "durationInSeconds": 14.982,
          "extensions": [],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "skipOffset": null,
          "startTime": "PT39.339S",
          "startTimeInSeconds": 39.339,
          "trackingEvents": [
            {
              "beaconUrls": [
                "https://myads.com/beaconing/event=impression"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698188",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            },
            {
              "beaconUrls": [
                "https://aws.amazon.com"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698188",
              "eventProgramDateTime": null,
              "eventType": "clickThrough",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            },
            {
              "beaconUrls": [
                "https://myads.com/beaconing/event=clicktracking"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "2698795",
              "eventProgramDateTime": null,
              "eventType": "clickTracking",
              "startTime": "PT39.339S",
              "startTimeInSeconds": 39.339
            }
          ],
          "vastAdId": ""
        }
      ],
      "availId": "2698188",
      "availProgramDateTime": "2023-07-31T16:53:40.577Z",
      "duration": "PT14.982S",
      "durationInSeconds": 14.982,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT39.339S",
      "startTimeInSeconds": 39.339
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQzOS4zMzlTXzIwMjMtMDctMzFUMTY6NTQ6MDQuODA1Mzk2NTI5Wl8x",
  "nonLinearAvails": []
}{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "2922274",
          "adParameters": "",
          "adProgramDateTime": "2023-08-14T19:49:53.998Z",
          "adSystem": "Innovid Ads",
          "adTitle": "VPAID",
          "adVerifications": [],
          "companionAds": [],
          "creativeId": "",
          "creativeSequence": "",
          "duration": "PT16.016S",
          "durationInSeconds": 16.016,
          "extensions": [],
          "mediaFiles": {
            "mediaFilesList": [
              {
                "apiFramework": "VPAID",
                "bitrate": 0,
                "codec": null,
                "delivery": "progressive",
                "height": 9,
                "id": "",
                "maintainAspectRatio": false,
                "maxBitrate": 0,
                "mediaFileUri": "http://my-ads.com/mobileapps/js/vpaid/1h41kg?cb=178344c0-8e67-281a-58ca-962e4987cd60&deviceid=&ivc=",
                "mediaType": "application/javascript",
                "minBitrate": 0,
                "scalable": false,
                "width": 16
              }
            ],
            "mezzanine": "http://my-ads.com/mobileapps/js/vpaid/1h41kg?cb=178344c0-8e67-281a-58ca-962e4987cd60&deviceid=&ivc="
          },
          "skipOffset": null,
          "startTime": "PT8M42.289S",
          "startTimeInSeconds": 522.289,
          "trackingEvents": [
            {
              "beaconUrls": [
                "about:blank"
              ],
              "duration": "PT16.016S",
              "durationInSeconds": 16.016,
              "eventId": "2922274",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT8M42.289S",
              "startTimeInSeconds": 522.289
            }
          ],
          "vastAdId": "1h41kg"
        }
      ],
      "availId": "2922274",
      "availProgramDateTime": "2023-08-14T19:49:53.998Z",
      "duration": "PT16.016S",
      "durationInSeconds": 16.016,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT8M42.289S",
      "startTimeInSeconds": 522.289
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQ4TTQyLjI4OVNfMjAyMy0wOC0xNFQxOTo1MDo0MS4zOTc5MjAzODVaXzE%3D",
  "nonLinearAvails": []
}
```

## Google 的图标为什么是这个广告 (WTA)
<a name="ad-reporting-client-side-ad-tracking-schema-player-controls-google-wta"></a>

*AdChoices*是一项行业标准，它为观众提供有关他们看到的广告的信息，包括这些广告是如何定位到他们的。

![\[谷歌 Why This Ad (WTA) 徽标。WTA 会告知观众他们看到的广告，包括这些广告是如何针对他们的。\]](http://docs.aws.amazon.com/zh_cn/mediatailor/latest/ug/images/google-wta.png)


 MediaTailor 客户端跟踪 API 支持 VAST 响应的 VAST 扩展节点中携带的图标元数据。有关 VAST 响应中的 WTA 的更多信息，请参阅[此示例 VAST XML 响应](https://storage.googleapis.com/interactive-media-ads/ad-tags/ima_wta_sample_vast_3.xml)。

**注意**  
MediaTailor 目前仅支持 VAST 版本 3。

```
<VAST>
    <Ad>  
    <InLine>  
       ...
      <Extensions>
        <Extension type="IconClickFallbackImages">
          <IconClickFallbackImages program="GoogleWhyThisAd">
            <IconClickFallbackImage width="400" height="150">
              <AltText>Alt icon fallback</AltText>
              <StaticResource creativeType="image/png"><![CDATA[https://storage.googleapis.com/interactive-media-ads/images/wta_dialog.png]]></StaticResource>
            </IconClickFallbackImage>
          </IconClickFallbackImages>
          <IconClickFallbackImages program="AdChoices">
            <IconClickFallbackImage width="400" height="150">
              <AltText>Alt icon fallback</AltText>
              <StaticResource creativeType="image/png"><![CDATA[https://storage.googleapis.com/interactive-media-ads/images/wta_dialog.png?size=1x]]></StaticResource>
            </IconClickFallbackImage>
            <IconClickFallbackImage width="800" height="300">
              <AltText>Alt icon fallback</AltText>
              <StaticResource creativeType="image/png"><![CDATA[https://storage.googleapis.com/interactive-media-ads/images/wta_dialog.png?size=2x]]></StaticResource>
            </IconClickFallbackImage>
          </IconClickFallbackImages>
        </Extension>
      </Extensions>
    </InLine>
  </Ad>
</VAST>
```

以下示例显示`/avails/x/ads/y/extensions`列表中的客户端跟踪响应。

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "0",
          "adParameters": "",
          "adProgramDateTime": null,
          "adSystem": "GDFP",
          "adTitle": "Google Why This Ad VAST 3 Sample",
          "adVerifications": [],
          "companionAds": [],
          "creativeId": "7891011",
          "creativeSequence": "1",
          "duration": "PT10S",
          "durationInSeconds": 10,
          "extensions": [
            {
              "content": "<IconClickFallbackImages program=\"GoogleWhyThisAd\">      
                          <IconClickFallbackImage height=\"150\" width=\"400\">      
                          <AltText>Alt icon fallback</AltText>      
                          <StaticResource creativeType=\"image/png\"><![CDATA[https://storage.googleapis.com/interactive-media-ads/images/wta_dialog.png]]>
                          </StaticResource>     
                          </IconClickFallbackImage>    
                          </IconClickFallbackImages>     
                          <IconClickFallbackImages program=\"AdChoices\">     
                          <IconClickFallbackImage height=\"150\" width=\"400\">     
                          <AltText>Alt icon fallback</AltText>       
                          <StaticResource creativeType=\"image/png\"><![CDATA[https://storage.googleapis.com/interactive-media-ads/images/wta_dialog.png?size=1x]]>
                          </StaticResource>      
                          </IconClickFallbackImage>      
                          <IconClickFallbackImage height=\"300\" width=\"800\">       
                          <AltText>Alt icon fallback</AltText>       
                          <StaticResource creativeType=\"image/png\"><![CDATA[https://storage.googleapis.com/interactive-media-ads/images/wta_dialog.png?size=2x]]>
                          </StaticResource>      
                          </IconClickFallbackImage>     
                          </IconClickFallbackImages>",
              "type": "IconClickFallbackImages"
            }
          ],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "skipOffset": "00:00:03",
          "startTime": "PT0S",
          "startTimeInSeconds": 0,
          "trackingEvents": [
            {
              "beaconUrls": [
                "https://example.com/view"
              ],
              "duration": "PT10S",
              "durationInSeconds": 10,
              "eventId": "0",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT0S",
              "startTimeInSeconds": 0
            }
          ],
          "vastAdId": "123456"
        }
      ],
      "availId": "0",
      "availProgramDateTime": null,
      "duration": "PT10S",
      "durationInSeconds": 10,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT0S",
      "startTimeInSeconds": 0
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQxMFNfMjAyMy0wNy0wNlQyMDo0MToxNy45NDE4MDM0NDhaXzE%3D",
  "nonLinearAvails": []
}
```

# 客户端信标
<a name="ad-reporting-client-side-beaconing"></a>

借助客户端跟踪`startTimeInSeconds`元素，您可以使用 MediaTailor 来支持信标计时。

以下 JSON 响应显示了主要的信标类型：展示次数、开始次数、四分位数和完成量。

**注意**  
互动广告局 (IAB) 的《视频展示量衡量指南》规定，展示次数要求广告内容在客户端加载，并且至少要有开始向玩家呈现的时间。有关更多信息，请参阅 IAB 网站上的[数字视频广告投放模板 (VAST)](https://www.iab.com/guidelines/vast/)。

```
{
  "avails": [
    {
      "ads": [
        {
          "adId": "8104385",
          "duration": "PT15.100000078S",
          "durationInSeconds": 15.1,
          "startTime": "PT17.817798612S",
          "startTimeInSeconds": 17.817,
          "trackingEvents": [
          {
              "beaconUrls": [
                "http://exampleadserver.com/tracking?event=impression"
              ],
              "duration": "PT15.100000078S",
              "durationInSeconds": 15.1,
              "eventId": "8104385",
              "eventType": "impression",
              "startTime": "PT17.817798612S",
              "startTimeInSeconds": 17.817
            },
            {
              "beaconUrls": [
                "http://exampleadserver.com/tracking?event=start"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0.0,
              "eventId": "8104385",
              "eventType": "start",
              "startTime": "PT17.817798612S",
              "startTimeInSeconds": 17.817
            },
            {
              "beaconUrls": [
                "http://exampleadserver.com/tracking?event=firstQuartile"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0.0,
              "eventId": "8104386",
              "eventType": "firstQuartile",
              "startTime": "PT21.592798631S",
              "startTimeInSeconds": 21.592
            },
             {
              "beaconUrls": [
                "http://exampleadserver.com/tracking?event=midpoint"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0.0,
              "eventId": "8104387",
              "eventType": "midpoint",
              "startTime": "PT25.367798651S",
              "startTimeInSeconds": 25.367
            },
            {
              "beaconUrls": [
                "http://exampleadserver.com/tracking?event=thirdQuartile"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0.0,
              "eventId": "8104388",
              "eventType": "thirdQuartile",
              "startTime": "PT29.14279867S",
              "startTimeInSeconds": 29.142
            },
            {
              "beaconUrls": [
                "http://exampleadserver.com/tracking?event=complete"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0.0,
              "eventId": "8104390",
              "eventType": "complete",
              "startTime": "PT32.91779869S",
              "startTimeInSeconds": 32.917
            }
          ]
        }
      ],
      "availId": "8104385",
      "duration": "PT15.100000078S",
      "durationInSeconds": 15.1,
      "startTime": "PT17.817798612S",
      "startTimeInSeconds": 17.817
    }
  ]
}
```

# 带有服务器端广告信标的混合模式
<a name="ad-reporting-hybrid-mode"></a>

MediaTailor 支持用于会话跟踪的混合模式。在此模式下，该服务会发出与播放相关的广告跟踪事件，但会话可以使用完整的客户端跟踪有效负载

要使用播放前缀启用混合跟踪，请根据您的协议，使用以下格式之一的请求从 MediaTailor 播放器初始化新的播放会话：

**Example : HLS 格式**  

```
POST master.m3u8
    {
        "adsParams": {
           "deviceType": "ipad"
       },
       "reportingMode":"server"
    }
```

**Example : 达世币格式**  

```
POST manifest.mpd
    {
        "adsParams": {
           "deviceType": "ipad"
       },
       "reportingMode":"server"
    }
```

MediaTailor 在混合模式下维护以下跟踪事件：
+ 印象
+ 晚于
+ 第一四分位数
+ Midpoint
+ 第三四分位数
+ 完成
+ `breakStart`(vmap)
+ `breakEnd`(vmap)

# 客户端广告跟踪集成
<a name="ad-reporting-client-side-ad-tracking-integrations"></a>

本节介绍各种客户端广告跟踪服务器 MediaTailor 之间的集成。

**Topics**
+ [打开测量 SDK](#ad-reporting-client-side-ad-tracking-integrations-open-measurement-sdk)
+ [Datazoom 免费播放器 SDKs](#ad-reporting-client-side-ad-tracking-integrations-dz)
+ [Roku 广告框架 (RAF)](#ad-reporting-client-side-ad-tracking-integrations-raf)
+ [TheoPlayer](#ad-reporting-client-side-ad-tracking-integrations-theoplayer)
+ [MediaTailor SDK](#ad-reporting-client-side-ad-tracking-integrations-mediatailor-sdk)

## 打开测量 SDK
<a name="ad-reporting-client-side-ad-tracking-integrations-open-measurement-sdk"></a>

互动广告局 (IAB) Open Measurement SDK (OM SDK) 便于第三方对投放到网络视频和原生应用环境的广告进行可见性和验证性评估。

对于较旧的 VAST 版本 3 文档，应使用扩展节点加载验证码，并带有扩展类型`AdVerifications`。扩展节点的根`AdVerifications`节点是与 VAST 4.1 元素具有相同架构的节点。

为了便于更轻松地采用 OM SDK， MediaTailor 已与 Datazoom 合作 SDKs ，免费提供针对开放测量进行配置和验证的播放器。有关更多信息，请参阅 [Datazoom 免费播放器 SDKs](#ad-reporting-client-side-ad-tracking-integrations-dz)。

**注意**  
MediaTailor 目前仅支持 VAST 版本 3。

**Example : VAST 3 中的验证节点，4.1 之前的版本**  

```
...
<Extensions>
    <Extension type="AdVerifications">
        <AdVerifications>
            <Verification vendor="company.com-omid">
                <JavaScriptResource apiFramework="omid" browserOptional="true">
                    <![CDATA[https://verification.com/omid_verification.js]]>
                </JavaScriptResource>
                <TrackingEvents>
                    <Tracking event="verificationNotExecuted">
                        <![CDATA[https://verification.com/trackingurl]]>
                    </Tracking>
                </TrackingEvents>
                <VerificationParameters>
                    <![CDATA[verification params key/value pairs]]>
                </VerificationParameters>
            </Verification>
        </AdVerifications>
    </Extension>
</Extensions>
```

MediaTailor 从`<Extensions>`节点提取`AdVerifications`数据并将其放入客户端跟踪响应中的`adVerifications`数组中。

**Example : 客户端跟踪响应中的广告数组**  

```
{
  "avails": [
    {
      "adBreakTrackingEvents": [],
      "adMarkerDuration": null,
      "ads": [
        {
          "adId": "3062770",
          "adParameters": "",
          "adProgramDateTime": "2023-08-23T16:25:40.914Z",
          "adSystem": "2.0",
          "adTitle": "AD-polarbear-15",
          "adVerifications": [
            {
              "executableResource": [],
              "javaScriptResource": [
                {
                  "apiFramework": "omid",
                  "browserOptional": "true",
                  "uri": "https://verification.com/omid_verification.js"
                }
              ],
              "trackingEvents": [
                {
                  "event": "verificationNotExecuted",
                  "uri": "https://verification.com/trackingurl"
                }
              ],
              "vendor": "company.com-omid",
              "verificationParameters": "verification params key value pairs"
            }
          ],
          "companionAds": [],
          "creativeId": "00006",
          "creativeSequence": "1",
          "duration": "PT14.982S",
          "durationInSeconds": 14.982,
          "extensions": [
            {
              "content": "<AdVerifications>\n\t\t\t\t\t\t<Verification vendor=\"company.com-omid\">\n\t\t\t\t\t\t\t<JavaScriptResource apiFramework=\"omid\" browserOptional=\"true\"><![CDATA[https://verification.com/omid_verification.js;]]></JavaScriptResource>\n\t\t\t\t\t\t\t<TrackingEvents>\n\t\t\t\t\t\t\t\t<Tracking event=\"verificationNotExecuted\"><![CDATA[;https://verification.com/trackingurl;]]></Tracking>\n\t\t\t\t\t\t\t</TrackingEvents>\n\t\t\t\t\t\t\t<VerificationParameters><![CDATA[verification params key/value pairs;]]></VerificationParameters>\n\t\t\t\t\t\t</Verification>\n\t\t\t\t\t</AdVerifications>",
              "type": "AdVerifications"
            }
          ],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "skipOffset": null,
          "startTime": "PT10.11S",
          "startTimeInSeconds": 10.11,
          "trackingEvents": [
            {
              "beaconUrls": [
                "https://n8ljfs0h09.execute-api.us-west-2.amazonaws.com/v1/impression"
              ],
              "duration": "PT14.982S",
              "durationInSeconds": 14.982,
              "eventId": "3062770",
              "eventProgramDateTime": null,
              "eventType": "impression",
              "startTime": "PT10.11S",
              "startTimeInSeconds": 10.11
            }
          ],
          "vastAdId": ""
        }
      ],
      "availId": "3062770",
      "availProgramDateTime": "2023-08-23T16:25:40.914Z",
      "duration": "PT14.982S",
      "durationInSeconds": 14.982,
      "meta": null,
      "nonLinearAdsList": [],
      "startTime": "PT10.11S",
      "startTimeInSeconds": 10.11
    }
  ],
  "dashAvailabilityStartTime": null,
  "hlsAnchorMediaSequenceNumber": null,
  "nextToken": "UFQxMC4xMVNfMjAyMy0wOC0yM1QxNjoyNjoyNC4yNDYxMDIxOTBaXzE%3D",
  "nonLinearAvails": []
}
```

**注意**  
与 IAB 技术实验室合作，确保应用程序每年都经过认证，以确保合规性。

有关 OM SDK 的更多信息，请参阅 IAB 技术实验室网站上的[开放测量 SDK](https://iabtechlab.com/standards/open-measurement-sdk/)。

## Datazoom 免费播放器 SDKs
<a name="ad-reporting-client-side-ad-tracking-integrations-dz"></a>

为了便于更轻松地采用该播放器 SDKs， MediaTailor 已与Datazoom合作 SDKs ，免费提供使用和IAB Tech进行配置[与 Google 广告管理器的客户端 AWS Elemental MediaTailor 集成](gam-integration-pal.md)和测试的播放器。[打开测量 SDK](#ad-reporting-client-side-ad-tracking-integrations-open-measurement-sdk)

Datazoom 播放器 SDK 支持以下功能：
+ 直播和 VOD 播放列表
+ DASH 和 HLS 规格
+ 玩家供应商支持 Bitmovin、exoplayer、安卓媒体播放器、苹果、Brightcove AVPlayer、Chromecast Receiver、Dash.js、hls.js、Shaka 播放器、THEO 播放器 JWPlayer、Video.js、Roku 等
+ IAB Tech Lab 开放测量认证，仅适用于特定设备
+ 点击事件处理
+ 广告事件调度器，例如广告倒计时器、广告叠加和非线性事件、广告时段开始、广告插播结束
+ 客户端广告信标
+ Google 编程访问库 (PAL) SDK，作为可选配置设置

Datazoom还提供玩家支持的付费分析和遥测服务。 SDKs客户可以从 Datazoom 管理控制台选择并控制玩家 SDK 遥测功能。[要访问Datazoom播放器 SDKs 并了解有关增值遥测和分析服务的更多信息，请使用Datazoom网站上的联系信息。](https://www.datazoom.io/partner-aws)

## Roku 广告框架 (RAF)
<a name="ad-reporting-client-side-ad-tracking-integrations-raf"></a>

Roku广告框架（RAF）在整个Roku平台上保持一致的广告体验。所有频道，包括视频广告，都必须符合Roku对英国皇家空军的认证要求。值得注意的是，该应用程序必须始终使用通过英国皇家空军触发的客户端事件。 MediaTailor，作为服务器端广告插入 (SSAI) 提供商，支持客户端事件触发。RAFX SSAI 适配器为 SSAI 清单服务器（拼接器）和 RAF 提供接口。这些接口包括：
+ 解析`masterURL`响应并提取`playURL``AdURL`、和广告元数据。
+ 将 MediaTailor SSAI 广告元数据转换为 RAF 可用的广告元数据，并配置 RAF 进行播放。
+ 观察直播事件和定时元数据。
+ 按时匹配直播事件、广告元数据和触发事件像素。
+ 按照 MediaTailor SSAI 清单服务器的`AdURL`要求执行 Ping/轮询，然后解析和重新配置 RAF。

有关适用于 RAF 的 SSAI 适配器的更多信息，请参阅 Roku 网站上的[使用 Roku 适配器实现服务器端广告插入](https://developer.roku.com/docs/developer-program/advertising/ssai-adapters.md)。

## TheoPlayer
<a name="ad-reporting-client-side-ad-tracking-integrations-theoplayer"></a>

TheoPlayer 与集成执行以下 MediaTailor 操作：
+ 提供支持 VOD 和直播工作流程的 HLS 和 DASH MediaTailor 客户端事件跟踪的功能。
+ 仅支持为线性广告发送跟踪信标。
+ 禁止在广告期间进行搜索。但是，当用户越过广告时段时，播放广告的逻辑并不合理。

要了解有关 SSAI 的更多信息 TheoPlayer，以及要查看网页、安卓、iOS 和 tvOS SDKs 的更多信息 MediaTailor，请[MediaTailor](https://docs.theoplayer.com/how-to-guides/01-ads/12-mediatailor.md)访问网站。 TheoPlayer 

## MediaTailor SDK
<a name="ad-reporting-client-side-ad-tracking-integrations-mediatailor-sdk"></a>

AWS Elemental 维护着一个 JavaScript基于软件开发套件 (SDK)。 AWS Elemental 按原样提供 SDK，不附带任何暗示担保。使用 SDK 作为参考演示，简化入门流程。 MediaTailorSDK 展示了如何与 MediaTailor 客户端跟踪 API 进行交互。SDK 可为 HTML5基于玩家的客户端广告跟踪和报告。SDK 会初始化 MediaTailor 客户端报告会话，然后定期请求广告跟踪信息。在播放期间，当检测到新的广告事件时，SDK 会发出广告跟踪事件。

S MediaTailor DK 支持以下功能：
+ 直播和 VOD 播放列表
+ DASH 和 HLS 规格
+ 点击事件处理
+ 广告活动调度员
+ 自定义事件挂钩
+ 客户端广告信标。有关发送广告信标的更多信息，请参阅[客户端信标](ad-reporting-client-side-beaconing.md)。

**注意**  
提交 Su AWS pport 工单以获取的示例 JavaScript SDK MediaTailor。您将收到软件包及其文件的下载链接。

## 通过广告信标进行寻呼 GetTracking
<a name="gettracking"></a>

使用`GetTracking`端点缩小向玩家返回的广告数量。例如，如果清单窗口很宽，跨越很长时间，则返回的广告信标数量可能会影响玩家的表现。

`GetTracking`返回一个`NextToken`值，您可以使用该值通过分页浏览返回的信标列表来缩小返回的信标数量。您可以循环浏览这些`NextToken`值，找到广告信标`StartTimeInSeconds`字段的所需值。
+ 在第一次调用`GetTracking`时，将返回所有可能落在清单窗口中的广告，包括每个广告的 a `NextToken` 和值。
+ 如果`GetTracking`请求*不*包含 a`NextToken`，则会返回清单窗口中的所有广告。
+ 如果`GetTracking`请求包含`NextToken`但没有新的信标可返 MediaTailor 回，则返回与您在原始请求中发送`NextToken`的信标相同的值。
+ 当不再有与广告对应的信标时，`GetTracking`会将该广告从其响应中移除。
+ 代币将在 24 小时后`GetTracking`过期。如果`NextToken`值大于 24 小时，则下一次调用将`GetTracking`返回空值`NextToken`。

### GetTracking 来自玩家的广义调用顺序
<a name="gettracking.generalsequence"></a>

来自客户端玩家的`GetTracking`请求是一个 POST，其请求正文包含与令牌相关的广告`NextToken`和信标。

```
https://YouMediaTailorUrl/v1/tracking
{

     "NextToken": "value"
     .
     .
     .
}
```

`GetTracking`与一起使用的一般顺序`NextToken`如下：

1. 拨打第一个电话`GetTracking`。

   将返回所有广告和信标以及后续调`NextToken`用的第一个广告和信标。

1. 如果的值为空，`NextToken`则 MediaTailor 返回所有广告信标。

1. 如果已过期，`NextToken`则 MediaTailor 返回一条 HTTP 返回码 400 错误消息。

   重新调用`GetTracking`以检索有效的 `NextToken` s。

1. 扫描整个响应，`StartTimeInSeconds`找到位于所需范围内的广告信标。

1. 使用与所需值`GetTracking``NextToken`关联的值对进行新调用`StartTimeInSeconds`。

1. 如有必要，请再次浏览返回的广告，直到找到想要播放的确切广告。

#### 扩展示例
<a name="gettracking.extendedexample"></a>

此示例说明如何使用`GetTracking`限制返回`NextToken`给玩家的广告信标的数量。

MediaTailor 收到`GetTracking`请求。响应中包含一个标识为 9935407 的广告和两个`StartTimeInSeconds`值分别为 52.286 和 48.332 秒的信标。

MediaTailor 发送 JSON 响应`NextToken`，如下所示：

```
  {
  "NextToken": JF57ITe48t1441mv7TmLKuZLroxDzfIslp6BiSNL1IJmzPVMDN0lqrBYycgMbKEb
  "avails": [
    {
      "ads": [
        {
          "adId": "9935407",
          "adVerifications": [],
          "companionAds": [],
          "creativeId": "",
          "creativeSequence": "",
          "duration": "PT15S",
          "durationInSeconds": 15,
          "extensions": [],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "startTime": "PT30S",
          "StartTimeInSeconds": 45,
          "trackingEvents": [
            {
              "beaconUrls": [
                "http://adserver.com/tracking?event=Impression "
              ],
              "duration": "PT0S",
              "durationInSeconds": 0,
              "eventId": "9935414",
              "eventType": "secondQuartile",
              "startTime": "PT52.286S",
              "StartTimeInSeconds": 52.286
            },
            {
              "beaconUrls": [
                "http://adserver.com/tracking?event=firstQuartile"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0,
              "eventId": "9935412",
              "eventType": "firstQuartile",
              "startTime": "PT48.332S",
              "StartTimeInSeconds": 48.332
            }
          ],
          "vastAdId": ""
        }
      ],
      "startTime": "PT46.47S",
      "StartTimeInSeconds": 46.47
    }
  ]
}
```

在下一个`GetTracking`请求中，使用以下`NextToken`值进行 MediaTailor 响应： JF57ITe48t1441mv7Tm LKu ZLrox DzfIslp 6Bi SNL1 IJmz PVMDN0lqr BYycg Mb KEb。

MediaTailor 使用与上次通话中设置的`StartTimeInSeconds`广告和信标相匹配`NextToken`的广告和信标进行响应。

假设现在响应中除了上一则编号为 9935407 的广告之外，还包括另一则编号为 9235407 的广告。广告编号为 9235407 的信标有 `StartTimeInSeconds` 132.41 和 70.339。

MediaTailor 遍历会话中的所有信标，以选择`StartTimeInSeconds`大于 52.286 秒的信标，即广告中 ID 为 9235407 的信标 3 和信标 4：

```
{
  "NextToken": ZkfknvbfsdgfbsDFRdffg12EdffecFRvhjyjfhdfhnjtsg5SDGN
  "avails": [
    {
      "ads": [
        {
          "adId": "9235407",
          "adVerifications": [],
          "companionAds": [],
          "creativeId": "",
          "creativeSequence": "",
          "duration": "PT15.816S",
          "durationInSeconds": 19.716,
          "extensions": [],
          "mediaFiles": {
            "mediaFilesList": [],
            "mezzanine": ""
          },
          "startTime": "PT2M0S",
          "StartTimeInSeconds": 120.0,
          "trackingEvents": [
            {
              "beaconUrls": [
                "http://adserver.com/tracking?event=complete"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0,
              "eventId": "8935414",
              "eventType": "firstQuartile",
              "startTime": "PT1M10.330S",
              "StartTimeInSeconds": 70.339
            },
            {
              "beaconUrls": [
                "http://adserver.com/tracking?event=thirdQuartile"
              ],
              "duration": "PT0S",
              "durationInSeconds": 0,
              "eventId": "8935412",
              "eventType": "secondQuartile",
              "startTime": "PT2M12.41S",
              "StartTimeInSeconds": 132.41
            }
          ],
          "vastAdId": ""
        },   
      ],
      "startTime": "PT36.47S",
      "StartTimeInSeconds": 36.47
    }
  ]
}
```