Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deevus/analytics-plugin-profitwell
https://github.com/deevus/analytics-plugin-profitwell
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/deevus/analytics-plugin-profitwell
- Owner: deevus
- Created: 2021-04-08T05:32:08.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2021-06-10T01:05:03.000Z (over 3 years ago)
- Last Synced: 2024-12-13T17:51:22.990Z (24 days ago)
- Language: TypeScript
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Profitwell
This library exports the `profitwell` plugin for the [`analytics`](https://www.npmjs.com/package/analytics) package & standalone methods for any project to use to make it easier to interact with [Profitwell](https://www.profitwell.com/).
This analytics plugin will load Profitwell into your application.
## Installation
```bash
npm install analytics
npm install analytics-plugin-profitwell
```## How to use
```typescript
import Analytics from 'analytics'
import profitwell from 'analytics-plugin-profitwell'const analytics = Analytics({
app: 'awesome-app',
plugins: [
profitwell({
publicToken: '1234' // required
identifyMode: 'user_id' // optional (valid values: user_id, email, custom)
getCustomId(traits) {
return traits.stripeId;
}, // required if `identifyMode` is "custom"
})
]
})
```