
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@58fe/log-plugins
Advanced tools
npm i @58fe/log-plugins -S
import { Log } from "@58fe/log-plugins";
Log(args);
// 引入
import { VueLog } from "@58fe/log-plugins";
Vue.use(VueLog);
// or
// 埋点默认项,参数传‘’会取配置项字段
Vue.use(VueLog, {
debug: false, // true: 打印埋点
pageType: 'home',
actionType: 'show',
cate: '9224',
p1: '1', // p1-p8字段见下列【58app埋点说明】
...
p8: '8',
openExposure: false, // 曝光数据上报开关
});
点击埋点:v-log-click="args"
展示埋点:v-log-show="args"
曝光埋点:v-log-exp="args"
曝光埋点需要配置项开启openExposure
原型使用:this.$log(args);
v-log-click="['home','click']"
this.$log(['home','click']);
// 引入
import React from "react";
import { ReactLog } from "@58fe/log-plugins";
ReactLog(React);
// or
// 埋点默认项,参数传‘’会取配置项字段
ReactLog(React, {
debug: false, // true: 打印埋点
pageType: 'home',
actionType: 'show',
cate: '9224',
p1: '1', // p1-p8字段见下列【58app埋点说明】
...
p8: '8'
});
// 组件使用
React.$log(args);
React.$log(['home','click']);
// 引入
import React from "react";
import WBAPP from '@w/wbapp';
import { RNLog } from "@58fe/log-plugins";
RNLog(React, {
ctx: WBAPP, // RN需要显示传入执行环境,其他用法同react
debug: false,
pageType: 'home',
actionType: 'show',
cate: '9224',
p1: '1',
...
p8: '8'
});
// 组件使用
React.$log(args);
参数 | 必填 | 类型 | 说明 |
---|---|---|---|
debug | false | boolean | 开启后打印埋点值 |
pageType | false | string/number | pageType 默认值 |
actionType | false | string/number | actionType 埋点默认值 |
cate | false | string | cate 埋点默认值 |
trackJoin | false | string | PC&M端 pageType和actionType 连接符,默认'_' |
args 类型为数组
参数 | 必填 | 类型 | 说明 |
---|---|---|---|
pageType | true | string/number | 页面类型,args 第一个值 |
actionType | app:true/pc:false/m:false | string/number | 埋点类型,args 第二个值 |
opts | false | object | 其他配置,对应 app opts,args 第三个值 |
opts = {
cate: "",
params: [],
};
// params 数组值对应埋点表中 p1、p2、p3 等字段,即[p1,p2,p3,p4,p5,p6,p7,p8]
1.需引入对应埋点 js,如 m 端://tracklog.58.com/referrer_m.js
2.pageType 对应埋点 from 参数,actionType、opts 值在 pc 和 m 端无效
FAQs
A plugin for tracklog.
The npm package @58fe/log-plugins receives a total of 1 weekly downloads. As such, @58fe/log-plugins popularity was classified as not popular.
We found that @58fe/log-plugins demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.