1.4.5 • Published 2 years ago

@yeger/page-views v1.4.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Features

  • 🕵🏻‍♂️ Privacy-friendly: No user-tracking. Clients decide when to submit a page view.
  • 🪶 Lightweight & Simple: Less than a kilobyte gzipped. Can be configured to automatically submit views, even after client-side navigation.
  • 💻 Self-hostable: By default, a public instance of the backend is used. Alternatively, a self-hosted instance or a custom backend adhering to the scheme can be used.

Installation

# yarn
$ yarn add @yeger/page-views

# npm
$ npm install @yeger/page-views

Usage

import PageViews from '@yeger/page-views'

// Manually submit a view of the current page
await PageViews.submitView()

// Automatically submit views
PageViews.autoSubmitViews()

// Get views of current page
await PageViews.getViews()

Examples

React and Vue examples can be found here.

Development

# install dependencies
$ yarn install

# build for production
$ yarn build

# build in watch mode
$ yarn dev

# lint project files
$ yarn lint

# serve docs
$ yarn docs:dev

License

MIT - Copyright © Jan Müller

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago