> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/publishers/zh/zhan-dian-yu-guang-gao-wei/additional-subids.md).

# 使用额外的子ID

正如在 [《Using Sub Ids》文档中所述](/publishers/zh/zhan-dian-yu-guang-gao-wei/subids.md)，Sub Ids 由发布商用于细分流量。例如，他们可以按流量来源这样做。然后，这些信息将显示在 **统计** 选项卡中，在 **子ID** 子选项卡下。

除此之外，还有另外两个参数，基本上与 `sub` 整体： `sub2` 和 `sub3`.

## 示例

### 异步广告位：横幅、粘性横幅、即时消息、Outstream 广告和多格式

添加 `data-sub` = XXXXXX, `data-sub2` = XXXXXX 和 `data-sub3` = XXXXXX

```html
<script async type="application/javascript" src="https://ads.examplesite.com/ad-provider.js"></script>
<ins class="adsbynetwork" data-zoneid="1234567" data-sub="XXXXXX" data-sub2="XXXXXX" data-sub3="XXXXXX"></ins>
<script>(AdProvider = window.AdProvider || []).push({"serve": {}});</script>
```

### iFrame

添加 `&sub`= XXXXXX, `&sub2`= XXXXXX 和 `&sub`3= XXXXXX

```html
<iframe src="//a.examplesite.com/iframe.php?idzone=1234567&size=300x250&sub=XXXXXX&sub2=XXXXXX&sub3=XXXXXX" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
```

### 原生

添加为 `data-ad_sub= "XXXXXX"; data-ad_sub2 = "XXXXXX"; data-ad_sub3 = "XXXXXX";`

```
data-ad_sub= "XXXXXX";
data-ad_sub2 = "XXXXXX";
data-ad_sub3 = "XXXXXX";
```

### RTB

添加于 `扩展` 对象作为 `&sub=XXXXXX, &sub2=XXXXXX, &sub3=XXXXXX`

```json
{
   "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
   "imp": [
       {
           "id": "974090632",
           "banner": {
               "w": 300,
               "h": 250
           }
       }
   ],
   "site": {
       "id": "12345",
       "domain": "sitedomain.com",
       "cat": ["IAB25-3"],
       "page": "https://sitedomain.com/page"
   },
   "device": {
       "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36",
       "ip": "131.34.123.159",
       "geo": {
           "country": "IRL"
       },
       "language": "en",
       "os": "Linux 和 UNIX",
       "js": 0,
       "ext": {
           "remote_addr": "131.34.123.159",
           "x_forwarded_for": "",
           "accept_language": "en-GB;q=0.8,pt-PT;q=0.6,en;q=0.4,en-US;q=0.2,de;q=0.2,es;q=0.2,fr;q=0.2"
       }
   },
   "user": {
       "id": "57592f333f8983.043587162282415065"
   },
   "ext": {
       "sub": 1221,
       "sub2": 2222,
       "sub3": 3333
   }
}
```

这些参数可用于进一步细分流量。但是，与 sub 不同，这不会显示在 **子ID** 的 sub 子选项卡中 **统计** 选项卡中。不过，我们会在内部记录它们。获取这些指标数据的唯一方式是通过 [发布商的 API 全局路由](https://api.exoclick.com/v2/docs/#!/47statistics/post_statistics_publisher_global).

以下是分别从 sub2 和 sub3 拉取数据时，请求应如何编写的两个示例：

### 按 sub2 和 sub3 分组

```json
{
  "count": 0,
  "detailed": 0,
  "timezone": "Europe/Dublin",
  "totals": 1,
  "filter": {
    "date_from": "2019-11-07",
    "date_to": "2019-11-07",
    "zone_id": [
      1234567
    ]
  },
  "group_by": [
    "sub2",
    "sub3"
  ],
  "order_by": [
    {
      "field": "impressions",
      "order": "desc"
    }
  ],
  "projection": [
    "base"
  ],
  "limit": 25,
  "offset": 0
}
```

### 按 sub2 和 sub3 过滤并分组

```json
{
  "count": 0,
  "detailed": 0,
  "timezone": "Europe/Dublin",
  "totals": 1,
  "filter": {
    "date_from": "2019-11-07",
    "date_to": "2019-11-07",
    "sub": [
      10001
    ],
    "sub2": [
      10002
    ],
    "sub3": [
      10003
    ],
    "zone_id": [
      1234567
    ]
  },
  "group_by": [
    "sub2",
    "sub3"
  ],
  "order_by": [
    {
      "field": "impressions",
      "order": "desc"
    }
  ],
  "projection": [
    "base"
  ],
  "limit": 25,
  "offset": 0
}
```

**注意**：只能在两个维度上分组。如果你想按 `sub`分组，则需要移除其中之一 `sub2` 还是 `sub3`。否则，响应将生成错误。

```json
{
  "message": "请求 `group_by` 数据无效。"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exoclick.com/publishers/zh/zhan-dian-yu-guang-gao-wei/additional-subids.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
