Before you start
- An admin role in your Waniwani organization.
- Your Amplitude project’s API key. In Amplitude, open Settings → Organization settings → Projects and pick the project. Click Manage next to API Keys and copy the API Key (it can show as Legacy API Key). Never paste the Secret Key: Waniwani only sends events and never needs it.
- Your project’s data center: US, or EU if you sign in at
app.eu.amplitude.com. - The Amplitude Browser SDK on the pages that show the chat.
Connect Amplitude
1
Paste the key
In Waniwani, open Settings → Connectors → Amplitude. Paste the API key, pick the data center and click Connect. Waniwani checks the key by sending one
waniwani connected event, on a test user named waniwani-connection-test. That one user stays in your project.2
Link the chat to your Amplitude users
Give the chat each visitor’s Amplitude device ID. Add this where the chat is installed:Run the script-tag line once Amplitude has loaded on the page. Then open your site and send one message: the step shows when a chat session with an Amplitude device ID came in.
3
Send a test conversation
Click Send test conversation. Your newest conversation goes to Amplitude right away, and Waniwani lists the events sent. In Amplitude, open User Look-Up, search the device ID, and the events show in that user’s activity within a few minutes.
The chat tells Waniwani whether your page set the visitor ID. Amplitude device IDs and the chat’s own visitor IDs are both random, so this is how Waniwani knows which one it got. The script tag loads the latest chat on its own. A React site needs
@waniwani/chat 1.5.1 or later.Conversations with no device ID are skipped
Every new ID you send to Amplitude becomes a new user, and Amplitude bills by user. So Waniwani sends a conversation only when the chat has the visitor’s Amplitude device ID. The others show as Skipped on the drain page, with a count under Last 7 days, and nothing reaches Amplitude for them. A conversation is skipped when the chat isn’t linked yet, whenamplitude.getDeviceId() returned nothing on that page, and for conversations that never had a browser (voice, ChatGPT, Claude).
What Amplitude receives
Text values longer than 1,024 characters are cut at 1,024, the Amplitude limit. If your site calls
amplitude.setUserId for signed-in visitors, Amplitude joins the device to that user, and the chat events follow.
Use it in Amplitude
- Do chatters convert better? In a funnel, start with
waniwani chat.user_messageand end with your conversion event, then compare with the same funnel for users who never chatted. - Which topics come before a conversion? Group
waniwani conversation analyzedbytopics, then add your conversion event as the next funnel step. - Where do conversations stall? Group
waniwani conversation analyzedbydrop_off_reason, or filter onfrustrated = trueand openwaniwani_session_urlto read the conversation in Waniwani.