# @inventage/matomo-opt-out

> A web component to let visitors opt-out of Matomo tracking

Latest version **1.3.0** (published 2020-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @inventage/matomo-opt-out
pnpm add @inventage/matomo-opt-out
yarn add @inventage/matomo-opt-out
bun add @inventage/matomo-opt-out
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2020-08-19 |
| First published | 2020-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Inventage AG |
| Maintainers | nickthegreek, niklaus-hug, peschee |
| Keywords | web-components, lit-element, lit-html, matomo, opt-out, tracking, analytics |

## Links

- npm: https://www.npmjs.com/package/@inventage/matomo-opt-out
- Repository: https://github.com/inventage/matomo-opt-out
- Homepage: https://github.com/inventage/matomo-opt-out#readme
- Issues: https://github.com/inventage/matomo-opt-out/issues
- npm.io page: https://npm.io/package/@inventage/matomo-opt-out

## Dependencies (3)

- [lit-html](https://npm.io/package/lit-html.md) ^1.2.1
- [http-jsonp](https://npm.io/package/http-jsonp.md) ^1.1.1
- [lit-element](https://npm.io/package/lit-element.md) ^2.3.1

## 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

- 1.3.0 (latest) — 2020-08-19
- 1.0.0-0 (next) — 2020-04-08
- 1.2.0 — 2020-06-26
- 1.1.0 — 2020-04-20
- 1.0.2 — 2020-04-15
- 1.0.1 — 2020-04-08
- 1.0.0 — 2020-04-08
- 0.2.0 — 2020-04-08

## README

# \<matomo-opt-out>

A web component to let visitors opt-out of Matomo tracking.

[![made with open-wc](https://img.shields.io/badge/made%20with-open--wc-%23217ff9?style=flat-square)](https://open-wc.org)
[![Build](https://img.shields.io/github/workflow/status/inventage/matomo-opt-out/Node.js%20CI?style=flat-square)](https://github.com/inventage/matomo-opt-out/actions?query=workflow%3A"Node.js%20CI")
[![Published on npm](https://img.shields.io/npm/v/@inventage/matomo-opt-out?style=flat-square)](https://www.npmjs.com/package/@inventage/matomo-opt-out)

## Dependencies

Your Matomo installation will have to have the [Ajax Opt Out] plugin enabled.

## Usage

```js
import '@inventage/matomo-opt-out';
```

```html
<matomo-opt-out matomo-url="https://analytics.your-domain.com"></matomo-opt-out>
```

### Note on browser compatibility & transformation

Currently, the recommended way to publish a web component using [open-wc] is to publish the ES6/7 source code as is. 
Since your application knows best about which browsers to support and how to transform the source code (if at all)
for those browsers, you will have to take care of any transformations yourself.

### Properties

| Property        | Attribute         | Type      | Default                                                  |
| --------------- | ----------------- | --------- | -------------------------------------------------------- |
| `isBusy`        |                   | `boolean` | false                                                    |
| `isTracked`     |                   | `boolean` | false                                                    |
| `matomoUrl`     | `matomo-url`      | `string`  |                                                          |
| `optedInLabel`  | `opted-in-label`  | `string`  | "You are not opted out. Uncheck this box to opt-out."    |
| `optedOutLabel` | `opted-out-label` | `string`  | "You are currently opted out. Check this box to opt-in." |

## Development

- Create a copy of `local.config-example.js` and name it `local.config.js`
- Add the URL to your Matomo installation
- Run `$ npm start`
- Navigate to http://localhost:8000/demo/

[ajax opt out]: https://plugins.matomo.org/AjaxOptOut
[lit-element]: https://lit-element.polymer-project.org/
[lit-html]: https://lit-html.polymer-project.org/
[open-wc]: https://open-wc.org

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