before

During the switchover of vuePress, the page will not be reloaded, so Baidu statistics will not be triggered. Therefore, you need to listen for route switching events, and manually report statistics to Baidu when switching pages.

Times have changed

Here you can enable single-page application data statistics. After this is enabled, Baidu Statistics will automatically record page PV logs for single-page applications based on History API or Hashchange. Developers do not need to manually bury points during route switching to view details.

Tongji.baidu.com/sc-web/1000…

This article uses the article synchronization assistant to synchronize