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

gmq-vue-track

v1.2.7

Published

vueTrack

Downloads

11

Readme

// 本项目是基于Vue开发 安装 npm i gmq-vue-track --save 参数 // 项目参数 projectName = null // 项目名称 projectCode = null // 项目唯一性code interfaceUrl = null // 项目埋点上报接口 // 浏览器参数 appCodeName = null// 与浏览器相关的内部代码名 都为Mozilla appName = null// 浏览器正式名称 均为Netscape appVersion = null// 浏览器版本号 onLine = null// 是否连接互联网,均true(未断网) platform = null// 所在平台,win32 product = null// 浏览器产品名,gecko userAgent = null// 判断浏览器类型 // uv 统计类型 uvType = null // IP、BF(浏览器指纹) // 唯一标识 uniqueKey = null // 唯一标识 // 页面参数 stayTime = null // 页面停留时间 eventList = [] // 页面事件集合 unitKey = null // 页面唯一性key值 routeTitle = null // 路由title routeName = null // 路由名称 path = null // 路由path fullPath = null // 路由fullPath menuName = null // 页面对应菜单名称 menuId = null // 页面对应菜单Id // 事件参数 eventType = null // 事件类型 eventName = null // 事件名称 eventMsg = null // 事件描述 // 上报类型参数 reportType = null // event 事件 page 页面

用法 import Vue from "vue" import {track,VTrack} from "v-track"

// 指令 Vue.use(VTrack) // 指令用法
1、默认click事件 目前只支持click事件 <el-button v-track="'事件名称'" @click="getErrorLogs()" type="primary">查询 2、支持对象传参 <el-button v-track="{name:'事件名称'}" @click="getErrorLogs()" type="primary">查询 3、label 触发点击事件触发两次问题 框架中 label 与 input 组合,可能会导致点击事件触发两次;关于这种情况请使用update方式 2、目前指令上传均是页面缓存批量上传,如若想要立即上报,请使用immediate <el-button v-track.immediate="'事件名称'" @click="getErrorLogs()" type="primary">立即上报

// 初始化埋点事件 track.init({ projectName: 'ProjectName', // 项目名称 projectCode: 'ProjectCode', // 项目唯一性Code interfaceUrl: 'http://localhost:3000/trackLogs/saveList', // 接口名称 uvType: 'BF' // UV类型 目前只支持浏览器指纹 }, () => { new Vue({ router, i18n, store, render: h => h(App) }).$mount('#app') }) // 监听路由变化 router.beforeEach((to, from, next) => { window.eventTrack.reportAll({ // 页面变化时批量上报 unitKey:to.meta.menuId, routeTitle:to.meta.title, routeName:to.name, path:to.path, fullPath:to.fullPath, menuName:to.meta.menuName, menuId:to.meta.menuId }, { unitKey:from.menu.menuId, routeTitle:from.meta.title, routeName:from.name, path:from.path, fullPath:from.fullPath, menuName:from.meta.menuName, menuId:from.meta.menuId }) })