# PC版和SP版页面的切换方法

PC版页面和智能手机版页面使用相同的URL， 根据访问用户设备的用户代理（以下简称UA），来进行页面的区分展示。

在Ptengine中，您可以直接调用要测量的页面，选择按钮等元素， 并且无需修改HTML源代码即可设置事件测量。 进行此设置时，默认情况下会调用PC版页面。

如果您想测量仅在智能手机版页面上显示的按钮， 您可以通过伪装浏览器的UA来调用智能手机版页面，从而进行测量设置。 这样，即使PC版页面和智能手机版页面使用相同的URL， 您也可以在不修改HTML源代码的情况下进行事件设置。


---

# 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/start-guide/pc-sp-switch.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.
