Developer quickstart

How to install Candu in three steps.

Getting started with Candu with is simple.

Account setup

To get set up, you'll need to:

  1. Visit your workspace to get your Client Token.

  2. Get the Portal Slug from your Portals page.

  3. Link any Tutorial and Segment to the Portal to check that the Portal is live on your site.

SDK Setup

Install the Candu SDK via NPM or yarn:

npm install @candulabs/react-sdk
yarn add @candulabs/react-sdk

Add CanduProvider above your Portal component. In order to provide the best customer experience, put the CanduProvider as close to the app root as possible.

Check the CanduProvider API reference for more information.

You can find your ClientToken in your settings page. In the Workspace Details section of the Settings page you can also update the primary domain (where Candu content will appear) and whitelist other domains ( such as localhost for local development ).

The UserId is a unique identifier for the end-user in your database.

// index.js
... // Where you bootstrap your application
import { CanduProvider } from '@candulabs/react-sdk';
import YourApp from './YourApp';
<CanduProvider clientToken="YOUR_CLIENT_TOKEN" userId="USER_ID_TO_TRACK">
<YourApp />

Add your Portal component within your application. Check the Portal API reference for more information.

import { Portal } from '@candulabs/react-sdk';
const YourPortal = <Portal slug="YOUR_PORTAL_SLUG" />

At this point, you can use Preview to validate that your test content appears within your Portal.


You have successfully installed Candu.

We recommend taking the following next steps:

Step 1: Add your application's unique styles and components

Specific about styling? We are too. Integrate your components with our React Styleguide.

Step 2: Add eventing with Segment

Want to personalize your content? Add Candu as a Segment Destination.

Want to learn more about how Candu works? Refer to the Technical overview.

Great work!