配置LeanCloud统计访问数据

LeanCloud 官网:https://console.leancloud.cn/

  1. _config.fluid.yml 查找关键字:web_analytics

    开启网页访问统计

image-web_analytics

  1. 创建 LeanCloud 应用

​ 进入 LeanCloud 官方网站,创建账号

​ 进入 LeanCloud 系统点击左上角的创建应用按钮创建一个新的应用

image-创建应用

创建应用完成以后,打开应用进入[设置 >> 应用凭证]

image-应用凭证

其中有三个参数

  • AppID
  • AppKey
  • REST API 服务器地址
  1. _config.fluid.yml 查找 leancloud,按照上面的数据进行配置

    配置 leancloud 数据

image-leancloud 数据

  1. _config.fluid.yml 查找 views,按照上面的数据进行配置

    配置浏览量计数

image-浏览量计数

  1. _config.fluid.yml 查找 leancloud

    设置 PV、UV 统计数

image-PV、UV 统计数

  1. 再重新部署 Hexo

    1
    2
    3
    4
    5
    6
    7
    8
    # 清除缓存
    hexo clean

    # 生成静态资源
    hexo g

    # 部署
    hexo d

    hexo ghexo generate 的简写;hexo dhexo deploy 的简写