Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deevus/analytics-plugin-tapfiliate
https://github.com/deevus/analytics-plugin-tapfiliate
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/deevus/analytics-plugin-tapfiliate
- Owner: deevus
- Created: 2021-03-09T05:02:50.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2021-03-21T00:11:43.000Z (almost 4 years ago)
- Last Synced: 2024-12-13T17:51:15.828Z (24 days ago)
- Language: TypeScript
- Homepage:
- Size: 80.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tapfiliate
This library exports the `tapfiliate` 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 [Tapfiliate](https://tapfiliate.com/).
This analytics plugin will load Tapfiliate into your application.
## Installation
```bash
npm install analytics
npm install analytics-plugin-tapfiliate
```## How to use
```typescript
import Analytics from 'analytics'
import tapfiliate from 'analytics-plugin-tapfiliate'const analytics = Analytics({
app: 'awesome-app',
plugins: [
tapfiliate({
tapfiliateId: '1234' // required
customerType: 'customer', // optional. can be customer, trial or lead (default: customer)
cookieDomain: 'www.example.com', //optional (default: none)
referralCodeParam: 'ref' // optional (default: ref)
})
]
})
```For more information view the [Tapfiliate documentation](https://tapfiliate.com/docs/javascript/)
## Registering a conversion
Registering a conversion is via a custom method
```typescript
analytics.plugins.tapfiliate.conversion(externalId, amount);
```