3.0.8 • Published 11 months ago

recure v3.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Recure.ai

Recure AI helps companies increase their revenue by detecting account sharers and free trial abusers and converting them into paying customers.

Quick start

First, run npm install recure for your app.

Then, in your app put the code:

import { RecureAIClient } from 'recure/web';
import { EventType } from 'recure/web/enums';

// Put this code after successful submitted form sign_up/login
const recure = new RecureAIClient({ publicApiKey: 'your-public-api-key' });
await recure.track({
  userOptions: { userId: 'userId', userEmail: 'example@email.com' },
  eventType: EventType.LOGIN,
});

Possible events in EventType:

  • LOGIN
  • SIGN_UP
  • PAGE
  • FREE_TRIAL_STARTED
  • FREE_TRIAL_ENDED
  • SUBSCRIPTION_STARTED
  • SUBSCRIPTION_ENDED

Note: If you use the PAGE event, you also should put eventOption as a 4-th parameter of the function.

import { RecureAIClient } from 'recure/web';
import { EventType } from 'recure/web/enums';

const recure = new RecureAIClient({ publicApiKey: 'your-public-api-key' });
await recure.track({
   userOptions: { userId: 'userId', userEmail: 'example@email' }, 
   eventType: EventType.PAGE, 
   eventOptions: { pageName: 'pageName' },
});

Notify the users

import { RecureAIClient } from 'recure/web';
import { EventType } from 'recure/web/enums';

const recure = new RecureAIClient({ privateApiKey: 'your-private-api-key' });

const flags = await recure.assess({
  accountId: 'userId',
  flag: FlagType.ACCOUNT_SHARER,
  score: 0.1,
});

if (flags.includes(FlagType.ACCOUNT_SHARER)) {
  // Based on your UI design, create a dialog for account sharing and open it
  accountSharingDialog();
}

You may not indicate the score parameter, by default it 0.6

3.0.8

11 months ago

3.0.7

11 months ago

3.0.6

12 months ago

3.0.5

12 months ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.1.9

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago