# 如何将同一类型的按钮合并为一个事件

在特集页面或过渡LP中，为了提高转换率，通常会设置多个相同类型的按钮。 本文将通过具体案例为您说明如何批量汇总这些按钮。

示例： 假设您想通过事件测量来跟踪下面的"添加到购物车"按钮的点击次数。

`<a href="class="add_basket" data-ItemID="STB64889″>添加到购物车</a>` `<a href="class="add_basket" data-ItemID="DTB99057″>添加到购物车</a>` `<a href="class="add_basket" data-ItemID="WTP99756″>添加到购物车</a>`

上述三条代码中，"data-ItemID="的值各不相同，如果您仅将其中一条作为事件获取的源进行设置：

`<a href="class="add_basket" data-ItemID="STB64889″>添加到购物车</a>`

那么您将只能测量一个商品的按钮。

因此，在事件设置的管理界面中，如果排除"data-ItemID="XXXXXXXX""部分，就可以计测"添加到购物车"按钮的点击数，无论"data-ItemID="的值是什么。


---

# Agent Instructions: 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:

```
GET https://helps.ptengine.com/cn/faq/insight-setting/event-merging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
