npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ideamake-buried-point-test

v1.2.0

Published

这是一个关于埋点的sdk

Downloads

4

Readme

埋点SDK 使用说明

版本 v1.0.0

安装sdk

  1. 安装
  yarn add ideamake-buried-point

使用sdk

  1. 引入
  import { IdeamakeBuriedPoint } from 'ideamake-buried-point'

初始化

  1. 初始化
  /**
  * @description 初始化埋点
  * @param {String} websocketUrl websocket地址【可选】
  * @param {String} userId 用户的id【必传】
  */
const ideamakeBuriedPoint = new IdeamakeBuriedPoint({websocketUrl: 'wss://...', userId: '12345678910'})

注册

  1. uniapp打包生成的app
  /**
  * @description 注册uniapp生成的app
  * @param {Function} success 注册成功【可选】
  * @param {Function} fail 注册成功【可选】
  * @param {Object} data 基础参数【必传】
  * @param {String | number} android_id 安卓id【可选】
  * @param {String} app_version 安卓版本号【可选】
  * @param {String} packgename app包名【可选】
  */
  ideamakeBuriedPoint.initUniApp({
    success() {}
    fail() {}
    data: { android_id, app_version, packgename }
  })
  1. uniapp生成的小程序
  /**
  * @description 注册uniapp生成的小程序
  * @param {Function} success 注册成功【可选】
  * @param {Function} fail 注册成功【可选】
  * @param {Object} data 基础参数【必传】
  * @param {String} language 语言,zh-cn、zh、en-us、其他【可选】
  */
  ideamakeBuriedPoint.initUniMiniprogram({
    data: { language  }, success() {}, fail() {}
  })
  1. uniapp生成的web
  /**
  * @description 注册uniapp生成的web
  * @param {Function} success 注册成功【可选】
  * @param {Function} fail 注册成功【可选】
  * @param {Object} data 基础参数【必传】
  * @param {String} language 语言,zh-cn、zh、en-us、其他【可选】
  */
  ideamakeBuriedPoint.initWeb({
    data: { language  }, success() {}, fail() {}
  })
  1. 原生小程序
  /**
  * @description 注册原生小程序
  * @param {Function} success 注册成功【可选】
  * @param {Function} fail 注册成功【可选】
  * @param {Object} data 基础参数【必传】
  * @param {String} language 语言,zh-cn、zh、en-us、其他【可选】
  */
  ideamakeBuriedPoint.initNativeMiniprogram({
    data: { language  }, success() {}, fail() {}
  })
  1. react/vue等开发的web
  /**
  * @description 注册uniapp生成的web
  * @param {Function} success 注册成功【可选】
  * @param {Function} fail 注册成功【可选】
  * @param {Object} data 基础参数【必传】
  * @param {String} language 语言,zh-cn、zh、en-us、其他【可选】
  */
  ideamakeBuriedPoint.initWeb({
    data: { language  }, success() {}, fail() {}
  })

使用

  1. buriedPoint
  /**
  * @description 注册uniapp生成的web
  * @param {Object} data 基础参数【必传】
  * @param {Object} business 业务参数【必传】
  * @param {Object} id 事件id【必传】
  * @param {Object} event 事件参数【必传】
  * @param {String} type 事件类型: clickEvent:点击 pageEvent:曝光 routerEvent:跳转
  */
  ideamakeBuriedPoint.buriedPoint({
    data: {event = {}, business = {}, id = ''}, type
  })