> For the complete documentation index, see [llms.txt](https://helps.ptengine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helps.ptengine.com/cn/experience/goal.md).

# 目标

目标，是用来**衡量一个体验有没有效果**的尺子。

创建了弹窗、做了 A/B 测试之后，到底有没有带来你想要的结果——靠给这个体验挂上目标来回答。

***

## 想做什么，看哪篇 <a href="#what-to-read" id="what-to-read"></a>

| 想做什么           | 看这篇                                                                     |
| -------------- | ----------------------------------------------------------------------- |
| 新建一个目标、给体验挂上目标 | [目标设置](https://helps.ptengine.com/cn/experience/goal/setting.md)        |
| 查看目标的达成情况      | [目标确认方法](https://helps.ptengine.com/cn/experience/goal/how-to-check.md) |
| 目标数据不对、对不上     | [“目标”相关问题](https://helps.ptengine.com/cn/faq/others/goal-faq.md)        |

***

## 目标怎么定义 <a href="#how-to-define" id="how-to-define"></a>

两种方式，二选一：

| 方式        | 说明                           | 注意                                       |
| --------- | ---------------------------- | ---------------------------------------- |
| **按 URL** | 用户访问到指定 URL（如感谢页、表单完成页）即计为达成 | 注意区分 https / http、有无 www；填多个 URL 时按“或”处理 |
| **按事件**   | 用户触发指定事件（如点击某按钮）即计为达成        | 事件需**先设置好且计数达到 1 次以上**，才会出现在下拉选项里        |

> 付费套餐还可以在目标定义里使用正则表达式，需要的话通过产品内右下角图标联系在线支持开通。

***

## 开始之前 <a href="#before-you-start" id="before-you-start"></a>

* 想用事件定义目标，先去把事件设好：
  * Insight 侧 — [可视化事件设置方法](https://helps.ptengine.com/cn/insight/event/setup.md)（推荐，不用写代码）
  * Experience 侧 — [自定义事件的设置方法](https://helps.ptengine.com/cn/experience/setting/custom-event-setup.md)
* 目标设置完成后，数值反映需要 30 分钟～1 小时
* 一个体验可以挂多个目标，建议同时挂上**主要转化**和**微转化**（如 CTA 点击率），分析视角会更完整

***

## 容易混淆的地方 <a href="#common-confusions" id="common-confusions"></a>

Experience 的“目标”和 Insight 的“[转化](https://helps.ptengine.com/cn/insight/conversion.md)”的统计口径不同，**即使设置内容一样，数字也会不同**：

* **目标**数的是达成条件的**用户数**
* **转化**数的是达成条件的**访问（会话）次数**

整体报告和体验报告里的目标数也会不一致，因为体验报告只算“看到过这个体验之后”才达成的。详见 [整体报告与体验报告的目标数不一致](https://helps.ptengine.com/cn/faq/data/goal-count-mismatch.md)。
