Skip to content

手动埋点,自动错误监控和性能信息收集

Notifications You must be signed in to change notification settings

ifunplus/track-utils

Repository files navigation

track-utils

手动埋点,自动错误监控和性能信息收集

start

cd server
npm start


cd src
npm run build


cd examples
open index.html with liveserver

Publish

npm publish

Usage

    import {TrackerHub} from 'track-utils'

    let trackerHub = new trackUtils.TrackerHub({
            appID: 'acupressure-h5-2022-01-01', // 应用唯一标识
            trackUtils_extraGlobalInfo:{
                userId:"123456",
                channel_type:"jgj_miniprogram"
            },
            trackUtils_requestUrl: 'http://127.0.0.1:3000/saveLog',
            trackUtils_enableErrorTracker: true, //是否开启错误监控
            trackUtils_enablePerformance: true, //是否开启性能监控
            trackUtils_errorBufferTime:3*1000 //3秒钟
    }) 

    //手动埋点
    trackerHub.triggerEvent({
        eventID:"clickSubmitBtn",
        eventTimeStamp:new Date().getTime()
    })

Contributing

License

MIT

About

手动埋点,自动错误监控和性能信息收集

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published