# 页面时长统计功能

## 目前支持页面时长统计的SDK有那些SDK

目前有：Android SDK、iOS SDK 、JS SDK

## 页面时长功能介绍

页面访问时长统计，当开启自动采集页面功能或手动调用页面采集功能，当页面关闭时自动上报页面关闭事件`page_close`。包含以下属性，页面停留时间`pageStayTime`（单位：毫秒）、页面地址`$url`和页面标题`$title`。

## 页面时长功能触发时机

Android：在页面切换的时候会触发如：Activity、Fragments切换

iOS：在页面切换的时候会触发如：UIViewController

JS：URL变化

## 页面时长为什么不是预制事件

此功能需要用户按需选择，故不作为预制事件，请手动加入元事件管理中


---

# 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://arkdocs.analysys.cn/integration/sdk/sdk-faq/page_close.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.
