Traffic Control¶
Overview¶
Traffic control allows you to display the Rose widget to only a percentage of your website visitors. This is useful mainly for Gradual rollout. You can start with a small percentage and increase as you gain confidence
How It Works¶
When traffic control is enabled, the widget uses a deterministic allocation to decide whether each visitor sees the widget. Each visitor is assigned a stable bucket (0-99) based on their client ID. If their bucket is below the configured traffic percentage, they see the widget.
The allocation is computed fresh on every page load from the server-side configuration, so changes to the traffic percentage take effect immediately.
Configuration¶
Traffic control is configured by your Rose account manager.
Forcing the Widget Display¶
If you need to see the widget regardless of traffic control settings (for testing, demos, or troubleshooting), you can override the allocation using your browser's console.
Enable Widget Display¶
Open your browser's Developer Tools (F12), go to the Console tab, and run:
const data = JSON.parse(localStorage.getItem('rose'));
data.widget.trafficControlOverride = true;
localStorage.setItem('rose', JSON.stringify(data));
Then refresh the page to see the widget.
Disable Widget Display¶
To simulate being outside the traffic allocation:
const data = JSON.parse(localStorage.getItem('rose'));
data.widget.trafficControlOverride = false;
localStorage.setItem('rose', JSON.stringify(data));
Reset to Natural Allocation¶
To remove your override and let the system decide naturally:
const data = JSON.parse(localStorage.getItem('rose'));
data.widget.trafficControlOverride = null;
localStorage.setItem('rose', JSON.stringify(data));
Checking Your Current Status¶
To see your current traffic control status:
const data = JSON.parse(localStorage.getItem('rose'));
console.log('Override:', data?.widget?.trafficControlOverride);
console.log('Last computed decision:', data?.widget?.trafficControl);
This will show:
trafficControlOverride: true- You have forced the widget to showtrafficControlOverride: false- You have forced the widget to hidetrafficControlOverride: null(or missing) - No override; the system decides based on traffic allocation
The trafficControl object shows the last computed decision (for debugging only — it does not influence the widget behavior).
Troubleshooting¶
If you don't see the widget after forcing the display:
- Refresh the page - The override only takes effect after a page reload
- Accept cookies - Some websites only load the Rose widget after cookie consent; make sure you've accepted cookies
- Disable ad blockers - Ad blockers may interfere with the widget, especially if it's loaded through Google Tag Manager
If the issue persists after trying these steps, contact your Rose account manager.
Notes¶
- Traffic control overrides are stored per-browser and per-domain
- Clearing your browser's localStorage will reset your override and allocation
- Traffic control settings are managed server-side by Rose; the localStorage override only affects your individual browser