Skip to content

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 random allocation to determine whether each visitor sees the widget. The allocation is stored in the visitor's browser, so they consistently see (or don't see) the widget across page loads and sessions.

flowchart TD A[Visitor arrives] --> B{Traffic control enabled?} B -->|No| C[Show widget] B -->|Yes| D{Already allocated?} D -->|Yes| E{In enabled group?} D -->|No| F[Random allocation] F --> G[Store in localStorage] G --> E E -->|Yes| C E -->|No| H[Widget hidden]

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.trafficControl.enabled = 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.trafficControl.enabled = 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'));
delete data.widget.trafficControl;
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('Traffic control status:', data?.widget?.trafficControl);

This will show:

  • enabled: true - You are in the group that sees the widget
  • enabled: false - You are in the group that doesn't see the widget
  • undefined - Traffic control is disabled or not yet allocated

Troubleshooting

If you don't see the widget after forcing the display:

  1. Refresh the page - The override only takes effect after a page reload
  2. Accept cookies - Some websites only load the Rose widget after cookie consent; make sure you've accepted cookies
  3. 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 allocation
  • Traffic control settings are managed server-side by Rose; the localStorage value only affects your individual browser