Segment integration
Cohere's Segment integration automatically forwards Cohere.identify calls to Segment's client side SDK to identify users.
First, install the cohere-js package via NPM:
npm install cohere-js # or, yarn add cohere-js
Then, import Cohere and call Cohere.init like so:
import Cohere from "cohere-js";
Cohere.init("INSERT_API_KEY_HERE", { segmentIntegration: true });
All Segment identify calls will be forwarded to Cohere, and logged in users will automatically be identified in the Cohere dashboard.
If the integration isn't working, make sure that analytics.load is called before Cohere.init.
Copy link