1.0.3 • Published 10 months ago

commune-sdk v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Commune SDK

Commune is a no/low-code platform that helps you discover hidden user insights, build complex A/B tests, and unlock new opportunities for growth. This SDK will help you integrate Commune's experimentation APIs into your Node.js projects.

Installation

You can install the Commune SDK via npm:

npm install commune-sdk

Usage

Here's how you can use the Commune SDK:

import commune from "commune-sdk";

const communeClient = commune.createClient({ projectKey: "YOUR_PROJECT_KEY" });

// Activate experiment
const activateResult = communeClient.activate("experimentKey");

// Get multivariant
const multivariant = communeClient.getMultivariant("experimentKey");

// Get single variant
const variant = communeClient.getVariant("experimentKey", "variableName");

// Track event
communeClient.track("eventName", { key: "value" });

Please replace 'YOUR_PROJECT_KEY', 'experimentKey', 'variableName', 'eventName', and { data } with your actual values.

Support

If you have any issues or requests, feel free to reach us at hello@commune.cx.

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago