Conversion Tracking¶
Overview¶
Rose tracks every conversation with a unique session ID. By capturing this session ID when a visitor converts (fills a form, books a demo, etc.), you can link each conversion in your CRM back to the exact Rose conversation that drove it.
There are two scenarios depending on which CTA the visitor clicks:
Scenario 1: Visitor clicks a Rose CTA¶
When a visitor clicks a CTA button inside the Rose chat (e.g., "Book a Demo"), Rose automatically appends the session ID as a URL parameter.
For example, if your CTA points to https://yoursite.com/book-demo, the visitor lands on:
Note
The parameter name (utm_id by default) is configurable in your Rose settings under Analytics > UTM parameter. Ask your account manager if you need a custom name.
How to capture it in your CRM¶
- Read the URL parameter on your CTA destination page.
- Store it in a hidden form field so it gets submitted along with the form.
- Create a matching property in your CRM (e.g., a custom field called
rose_session_idin HubSpot, Salesforce, etc.).
Example with a hidden field:
<form action="/submit" method="POST">
<!-- Your visible fields -->
<input type="text" name="email" placeholder="Email" />
<input type="text" name="company" placeholder="Company" />
<!-- Hidden field for Rose session ID -->
<input type="hidden" name="rose_session_id" id="rose_session_id" />
<button type="submit">Submit</button>
</form>
<script>
// Extract utm_id from the URL and populate the hidden field
const params = new URLSearchParams(window.location.search);
const sessionId = params.get('utm_id');
if (sessionId) {
document.getElementById('rose_session_id').value = sessionId;
}
</script>
Scenario 2: Visitor clicks your own CTA¶
When a visitor interacts with Rose and then clicks a CTA button that is not inside the Rose chat (e.g., your website's own "Contact Us" button), Rose doesn't control the URL. Instead, the session ID is available in the visitor's browser via cookies and localStorage.
Available data¶
Cookies¶
| Cookie | Description |
|---|---|
rose_last_active_session |
Session ID of the last conversation where the visitor sent a message |
rose_last_active_session_date |
Unix timestamp (ms) of the last message |
rose_client_id |
Stable visitor ID across sessions |
Cookies are set on the root domain (e.g., .example.com), so they work across subdomains.
localStorage¶
| Key path | Description |
|---|---|
rose.widget.analytics.lastActiveSessionId |
Same as rose_last_active_session cookie |
rose.widget.analytics.lastActiveSessionDate |
Same as rose_last_active_session_date cookie |
rose.widget.analytics.clientId |
Same as rose_client_id cookie |
How to capture it¶
Read the session ID from cookies or localStorage, then include it in your form — either as a hidden field or appended to the form's action URL.
Option A: Hidden field (recommended)
<form action="/submit" method="POST">
<input type="text" name="email" placeholder="Email" />
<input type="hidden" name="rose_session_id" id="rose_session_id" />
<button type="submit">Submit</button>
</form>
<script>
// Read from cookies
function getRoseSessionId() {
const match = document.cookie.match(/rose_last_active_session=([^;]+)/);
return match ? decodeURIComponent(match[1]) : null;
}
const sessionId = getRoseSessionId();
if (sessionId) {
document.getElementById('rose_session_id').value = sessionId;
}
</script>
Option B: Append to URL
// Read session ID and add it to your CTA link
function getRoseSessionId() {
const match = document.cookie.match(/rose_last_active_session=([^;]+)/);
return match ? decodeURIComponent(match[1]) : null;
}
const sessionId = getRoseSessionId();
if (sessionId) {
const ctaLink = document.querySelector('a.cta-button');
const url = new URL(ctaLink.href);
url.searchParams.set('utm_id', sessionId);
ctaLink.href = url.toString();
}
Setting up your CRM¶
Once the session ID reaches your CRM with each conversion, you can:
- See which conversations led to conversions — Search for the session ID in the Rose backoffice to read the full conversation.
- Measure Rose's impact — Count how many CRM records have a
rose_session_idto see how many conversions Rose influenced. - Enrich CRM records later — Use the session ID to pull conversation summaries, qualification data, or interest signals via webhooks.
CRM setup checklist¶
- [ ] Create a custom property in your CRM (e.g.,
rose_session_id, type: text) - [ ] Map the hidden form field or URL parameter to that property
- [ ] Test by chatting with Rose, clicking a CTA, submitting the form, and verifying the session ID appears in the CRM record
Combining with Event Forwarding¶
For real-time analytics (e.g., tracking CTA clicks in Google Analytics), see Event Forwarding. Event forwarding and conversion tracking are complementary:
- Event Forwarding gives you real-time analytics events with the session ID in the event payload.
- Conversion Tracking (this page) captures the session ID in your CRM for lead attribution.
Need Help?¶
Contact your Rose account manager if you need help setting up conversion tracking for your specific CRM or form setup.