# szyreport

> 前端报数工具

Latest version **1.1.6** (published 2020-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install szyreport
pnpm add szyreport
yarn add szyreport
bun add szyreport
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2020-12-29 |
| First published | 2019-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ztjy-fe |
| Maintainers | ztjy-fe |
| Keywords | util, tool, common-util |

## Links

- npm: https://www.npmjs.com/package/szyreport
- Repository: https://github.com/ztjy-fe/szyreport
- Homepage: https://github.com/ztjy-fe/szyreport#readme
- Issues: https://github.com/ztjy-fe/szyreport/issues
- npm.io page: https://npm.io/package/szyreport

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2020-12-29
- 1.1.5 — 2019-08-09
- 1.1.4 — 2019-08-09
- 1.1.3 — 2019-08-09
- 1.1.2 — 2019-08-09
- 1.1.1 — 2019-03-01
- 1.1.0 — 2019-02-28
- 1.0.9 — 2019-02-28
- 1.0.8 — 2019-02-28
- 1.0.7 — 2019-02-27
- 1.0.6 — 2019-02-22
- 1.0.5 — 2019-02-22
- 1.0.4 — 2019-02-21
- 1.0.3 — 2019-02-20
- 1.0.2 — 2019-02-19
- … 1 more at https://npm.io/package/szyreport/versions

## README

# szyreport

 
前端报数工具  


### 安装使用

1. 直接下载[https://static.szy.cn/javascript/vendor/log/szyreport.min.js](https://static.szy.cn/javascript/vendor/log/szyreport.min.js)使用 
 
2. 使用cdn

``` html
  <script src="https://static.szy.cn/javascript/vendor/log/szyreport.min.js"></script>
  
```
3. 使用npm安装
``` bash
$ npm install --save-dev szyreport
```
3.1. 页面中引入

``` javascript
// 使用CommonJs方式引入
const szyreport = require('szyreport');
```
#### 或者：
```
// 使用ES6方式引入
import szyreport from 'szyreport'
```
### 调用：
```
    // pv报数 页面报数参数
    const pvData = {
        'status': '', //状态
        'trial': '',//试看(选填)
        'stay_time': '',//时长(选填)
        'progress': '',//浏览进度(选填)
        'page_category': '',//页面大类(选填)
        'page': '',// 页面(选填)
        'page_id': '',//页面ID(选填)
        'parm': '',//自定义参数(选填)
        'f_page': '',//来路页面(选填)
        'f_page_id': '',//来路页面ID(选填)
        'f_page_location': ''//来路页面位置(选填)
     };
    // event报数 页面报数参数
    const eventData = {
        'event_id': '', //事件ID
        'obj_type': '',//事件对象类型(选填)
        'obj_id': '',//事件对象ID(选填)
        'parm': '',//自定义参数(选填)
        'f_page': '',//来路页面(选填)
        'f_page_id': '',//来路页面ID(选填)
        'f_page_location': ''//来路页面位置(选填)
    };
    
    // PV 报数
    szyreport.reportPV({
        data: pvData, //页面报数参数（必填）
        prefix:'alpha',// 测试环境'alpha'，线上环境''（选填）
    });
    
    // 埋点报数
    szyreport.reportEvent({
        data: eventData, //页面报数参数（必填）
        prefix:'alpha',// 测试环境'alpha'，线上环境''（选填）
        callback: () =>{} //埋点报数时需要的回调函数 （选填）
    });

```

---
_Source: https://npm.io/package/szyreport · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
