Eventing

The Candu SDK gives you the ability to track your own custom events to signal significant events related to your product domain.

This is useful for evaluating the success of your Content and can be used to represent goals set in the Event stream. This is found from the Dashboard under Settings > Events.

There are two ways you can do this:

  1. Eventing via SDK context (useEventing - you must be within the context of CanduProvider)

  2. Eventing as a stand alone library (using @candulabs/eventing); see here for instructions.

Track example using the SDK:

import { useEventing } from "@candulabs/react-sdk";

const MyComponent = () => {
const { track } = useEventing();

return (
<Button onSubmit={() => track('Newsletter Subscription', { name: 'Joan Smith' })}>
Click me
</Button>
);
}

The first parameter of track is the event name and the second parameter is an object of key values to associate with the event.


Third-party Integrations

Segment Status

Segment.io Integration

This integration sends user data (like content views, button or link clicks and checklist completions), from Candu to Segment.io, where it can be tied to other data sources that you use to help you understand your content's impact on user behavior within your product.

To install the Segment Integration, please refer to the Candu Source documentation.

What to track

Candu uses the same event and tracking concepts as Segment; see links for further details:

ℹ️ Please note that Candu can only use events sent on a go-forward basis from the date of install. To use events that occurred before installation, please send them as traits using the identify call.

Did this answer your question?