# v-track-plus

> Element Track For Vue3

Latest version **0.1.1** (published 2023-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install v-track-plus
pnpm add v-track-plus
yarn add v-track-plus
bun add v-track-plus
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-05-15 |
| First published | 2023-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | gkf442573575@163.com |
| Maintainers | gkfonline |
| Keywords | vue, vue track, track, vue track plus |

## Links

- npm: https://www.npmjs.com/package/v-track-plus
- Homepage: https://github.com/gkf442573575/v-track-plus#readme
- Issues: https://github.com/gkf442573575/v-track-plus/issues
- npm.io page: https://npm.io/package/v-track-plus

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2023-05-15
- 0.1.0 — 2023-03-06
- 0.0.10 — 2023-03-06
- 0.0.9 — 2023-03-06
- 0.0.8 — 2023-03-06
- 0.0.7 — 2023-03-06
- 0.0.6 — 2023-03-06
- 0.0.5 — 2023-03-03
- 0.0.4 — 2023-03-03

## README

# v-track-plus

### Vue Element Track

[![NpmVersion](https://img.shields.io/npm/v/v-track-plus.svg)](https://www.npmjs.com/package/v-track-plus)
![npm](https://img.shields.io/npm/dw/v-track-plus.svg)

## Install

```bash
$ npm install v-track-plus --save
```

## Use

<b>src/main.js</b>

#### Types

```ts
interface TrackOptions {
  baseURL: string;
  baseParams?: any;
  baseCallBack?: (url: string, trackType: string, params: any) => void;
}

interface TrackValue {
  url?: string;
  params?: any;
  triggerEvent?: string;
  interval?: number;
  callback?: (url: string, trackType: string, params: any) => void;
}

interface TrackParam {
  url: string;
  params: any;
  trackType: string;
  triggerEvent: string;
  interval: number;
  callback: (url: string, trackType: string, params: any) => void;
}
```

#### Vue2

```ts
import { vTrack } from '@dgov/web-plugin'

Vue.use(vTrack, options: TrackOptions)
```

#### Vue3

```ts
import { vTrackPlus } from '@dgov/web-plugin'

app.use(vTrackPlus, options: TrackOptions)
```

\*.vue

```html
<template>
  <!-- Default Click Event -->
  <button v-track>Click</button>
  <!-- TrackValue TrackValue[]-->
  <button v-track:click|keyboard:13="{ url: '111', params: params }">TrackValue</button>
  <button
    v-track:click|keyboard:13="[
      { url: '111', params: params },
      { url: '222', params: params, triggerEvent: 'click' }
    ]"
  >
    TrackValue[]
  </button>
</template>

<script>

export default {
  data() {
    return {
      params: {
        id: 1
      }
    }
  }
}
</script>

```

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