Cloudflare 中文文档
Analytics
Analytics
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

Web Analytics for Single Page Applications (SPAs)

Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API’s pushState function and listening to the onpopstate. Hash-based router is not supported.

To disable measuring SPAs, add the spa option with a value of false in the data attribute, as shown below.

If you are using Google Tag Manager (GTM), use the query string to pass the spa option instead.