Getting current session URL
If you would like to pass the Cohere session URL to other services (e.g. your CRM or analytics platform), you can use the Cohere.addSessionUrlListener API:
1
// Add a session URL listener
2
const listener = (sessionUrl) => {
3
// sessionUrl is a string corresponding to the current session's URL
4
};
5
Cohere.addSessionUrlListener(listener);
6
7
// Remove a session URL listener
8
Cohere.removeSessionUrlListener(listener);
Copied!
Last modified 7d ago
Copy link