Simulate visitor data with __rm_test parameter
The __rm_test URL parameter lets you simulate visitor segments, tags, and ESP data on your site without needing a real subscriber record. This is useful for previewing personalization, testing campaigns, or QA-ing rare segment combinations.
Analytics tracking is automatically disabled when using __rm_test so your test data won't pollute your reports.
How it works
Add ?__rm_test=<base64-encoded-JSON> to any page URL where your RightMessage snippet is installed. The snippet will simulate the visitor data you provide and re-run all personalization rules, campaigns, and Flows.
The simulation persists via cookie as you navigate between pages, so you only need the parameter on the first page you visit.
Building the payload
Create a JSON object with the visitor data you want to simulate, then base64-encode it.
Basic structure
{
"segments": {
"dim_DIMENSION_ID": "seg_SEGMENT_ID"
},
"context": {
"ESP_NAME": {
"email": "[email protected]",
"tags": ["tag1", "tag2"],
"customFields": {
"field_name": "value"
}
}
}
}Segments
To simulate segment membership, use the segments object. Keys must start with dim_ (your dimension ID), values must start with seg_ (your segment ID).
You can find these IDs in your RightMessage dashboard by inspecting dimension and segment URLs, or use the debugger to see the IDs of your current segments.
ESP data (optional)
The context object simulates data from your email service provider. This only works if you have an active ESP integration configured.
The key should match your ESP name (e.g., kit for Kit/ConvertKit, klaviyo for Klaviyo, activecampaign for ActiveCampaign).
Supported fields:
email— Subscriber email addresstags— Array of tag nameslists— Array of list IDs or namescustomFields— Object of custom field key-value pairsnativeFields— ESP-specific fields (firstName, lastName, etc.)events— Array of event objectspurchases— Array of purchase objectstotalRevenue— Number representing total customer value
If you provide context data but don't have an ESP integration configured, it will be ignored.
Example
Let's say you want to test how your site looks for a VIP customer who's tagged as "premium" in Kit and belongs to your "Advanced" experience level segment.
First, create your JSON payload:
{
"segments": {
"dim_abc123": "seg_xyz789"
},
"context": {
"kit": {
"email": "[email protected]",
"tags": ["premium", "subscriber"],
"customFields": {
"plan": "pro"
}
}
}
}Base64-encode the entire JSON string. You can use a tool like btoa() in your browser console:
btoa(JSON.stringify({
segments: { "dim_abc123": "seg_xyz789" },
context: {
kit: {
email: "[email protected]",
tags: ["premium", "subscriber"],
customFields: { plan: "pro" }
}
}
}))Then append the result to your URL:
https://yoursite.com/?__rm_test=eyJzZWdtZW50cyI6eyJkaW1fYWJjMTIzIjoic2VnX3h5ejc4OSJ9LCJjb250ZXh0Ijp7ImtpdCI6eyJlbWFpbCI6InZpcEBleGFtcGxlLmNvbSIsInRhZ3MiOlsicHJlbWl1bSIsInN1YnNjcmliZXIiXSwiY3VzdG9tRmllbGRzIjp7InBsYW4iOiJwcm8ifX19fQ==Use with the debugger
Combine __rm_test with ?debug=true to see exactly what data is being simulated:
https://yoursite.com/?__rm_test=<payload>&debug=trueThe debugger panel will show a notice that visitor data is being simulated and display the active segments and context data.
For more on the debugger, see Using the RightMessage Debugger.
Limitations
Payload size limit: The raw JSON (before encoding) must be under 10,000 characters
Valid JSON required: Malformed JSON will fail silently with a console warning
ID prefixes required: Dimension IDs must start with
dim_, segment IDs withseg_Client-side only: This parameter is processed by the JavaScript snippet on your site, not on RightMessage's servers
Cookie-based persistence: Remove the cookie or use an incognito window to clear simulation state