0.0.8 • Published 10 months ago

@wflock/node-flock v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Installation

npm install --save @flock/node-flock

Usage

import { createServerClient } from '@flock/node-flock';

const flock = createServerClient({
  serviceAccessKey: 'YOUR_ACCESS_KEY', // Replace YOUR_ACCESS_KEY with your public access key
});

const { campaignId, referrerUserId, referralCode } = await flock.getCampaignMetadata(request);
import { createBrowserClient } from '@flock/node-flock';

const flock = await createBrowserClient({
  publicAccessKey: 'YOUR_ACCESS_KEY', // Replace YOUR_ACCESS_KEY with your public access key
  campaignId: 'YOUR_CAMPAIGN_ID', // Replace YOUR_CAMPAIGN_ID with your campaign ID
});

flock.identify({
  userId: 'USER_ID', // Replace USER_ID with the variable you use to capture the user's ID
  email: 'USER_EMAIL', // Optional. Replace USER_EMAIL with the variable you use to capture the user's email
  name: 'USER_NAME' // Optional. Replace USER_NAME with the variable you use to capture the user's name
});
0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago