JSPM

@dcloudio/uni-stat

0.0.102
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9328
  • Score
    100M100P100Q136724F
  • License Apache-2.0

Package Exports

  • @dcloudio/uni-stat

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dcloudio/uni-stat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

介绍

uni-app 统计前端解决方案

支持的平台

  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 字节跳动小程序

统计能力

目前只统计了应用的启动,即重写了 App 的 onLaunch 生命周期函数。

开发说明

安装依赖

$ npm install

开发版的会有一部分日志信息,方便调试字段以及测试各个平台上获取数据的结果。

$ npm run dev

生产版为最终发布的版本

$ npm run build

使用说明

目前手动 build 出来的插件,需要自己修改 dcloud-stat-config.js 中的 app_key 即 manifest.json -> appid 值。

  1. 在 uni-app 项目下新建一个目录(不要放 static),例如 stat 将 dist 目录下的 dcloud-stat.js dcloud-stat-config.js 复制进去。
  2. 确认 dcloud-stat-config.js 中 app_key 的值无误。
  3. 在 main.js 第一行引入,要比引入 Vue 更晚。

注意事项

  • 开发工具中运行不会上报信息
  • 除了自定义事件,

HBuilderX

CLI

已知的问题

  • 支付宝小程序没有 SDKVersion