#
Getting started
To connect user activity across platforms and provide insight into community engagement and behavior, Workleap has adopted Common Room, a marketers platform that aggregates data from sources like social media, forums, and product tools to build unified user profiles.
This package provides default Common Room instrumentation for Workleap applications.
#
Install the packages
First, open a terminal at the root of the application and install the following packages:
pnpm add @workleap/common-room
#
Register instrumentation
Then, register Common Room instrumentation using the registerCommonRoomInstrumentation function:
import { registerCommonRoomInstrumentation } from "@workleap/common-room";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./App.tsx";
registerCommonRoomInstrumentation("my-site-id");
const root = createRoot(document.getElementById("root")!);
root.render(
<StrictMode>
<App />
</StrictMode>
);
#
Identify a user
To associate the anonymous activities with an existing user, identify the current user using the identify function:
import { identify } from "@workleap/common-room";
identify("johndoe@contoso.com");
#
Try it 🚀
Start the application in a development environment using the dev script. Go to the "Identify" page and press the button to identify the current user. Then navigate to your Common Room instance and go to the "Activity" page, you should see new data appear in the next 10 minutes.
#
Troubleshoot issues
If you are experiencing issues with this guide:
- Set the verbose predefined option to
true
. - Open the DevTools console and look for logs starting with
[common-room]
. - Refer to the sample on GitHub.
#
Renew cookies
If nothing else works, renewing the Common Room cookies with new user id and session id values may help.
To do this, open the browser's developer tools, navigate to Application
> Storage
> Cookies
, select the relevant site, and delete the signals-sdk-session-id
and signals-sdk-user-id
cookies.
Finally, refresh the page to generate new cookies.