Onpane

Widget Behavior

Learn how the Onpane widget handles dismissals, scheduling, multiple announcements, and analytics tracking.

Dismissal

When a visitor clicks the close button (or presses Escape):

  1. The announcement bar is hidden with an exit animation
  2. The dismissal is saved to localStorage (or sessionStorage for "Session" duration)
  3. The announcement won't reappear until the configured dismissal duration expires

Dismissals are tracked per announcement. If you create a new announcement, it will display even if a previous one was dismissed.

Dismissal Durations

DurationStorageBehavior
SessionsessionStorageClears when the browser tab or window is closed
1 hourlocalStorageAnnouncement reappears after 1 hour
1 weeklocalStorageAnnouncement reappears after 7 days
1 monthlocalStorageAnnouncement reappears after 30 days
ForeverlocalStorageAnnouncement never reappears for that visitor

Expired dismissal records are cleaned up automatically when the widget initializes.

Non-Dismissable Announcements

Each announcement has an "Allow visitors to dismiss" setting that controls whether visitors can close the announcement bar.

When dismissal is disabled:

  • The close (X) button is hidden completely
  • The Escape key does not dismiss the bar
  • The announcement shows on every page load with no localStorage tracking
  • CTA link clicks still navigate normally but do not close the bar
  • End dates are still respected — the announcement expires on schedule regardless of dismissal settings

New announcements default to dismissable. The setting can be changed at any time, including on active announcements, and takes effect immediately.

Scheduling

An announcement displays only when all conditions are met:

  • The announcement is in an active state (not draft, scheduled, ended, or canceled)
  • The current time is after the start date
  • The current time is before the end date (if one is set)

All dates are stored in UTC and compared server-side before delivering announcement data to the widget.

Multiple Announcements

Only one announcement displays at a time. If multiple announcements are active, the most recently started one is shown. Previous announcements are not queued or rotated.

Analytics

Event Tracking

When analytics is enabled for your project, the widget automatically tracks three event types:

  • Views -- Counted once per browser session per announcement (deduplicated via sessionStorage)
  • CTA Clicks -- Counted each time a visitor clicks the call-to-action link
  • Dismissals -- Counted each time a visitor dismisses the announcement

Events are sent as lightweight fire-and-forget API calls. They do not use cookies, fingerprinting, or any form of user tracking.

GDPR Compliance

Analytics tracking can be disabled per project in your dashboard settings (Settings > Analytics Tracking). When disabled, the widget sends zero tracking requests.

Important: Depending on your jurisdiction, you may need to inform site visitors about analytics tracking in your privacy policy. The widget tracks only anonymous aggregate counts -- no personal data, no cookies, no IP addresses are stored.

Data Collected

Only pre-aggregated counts are stored per announcement:

  • Total views
  • Total CTA clicks
  • Total dismissals

No individual user data, IP addresses, or browsing behavior is recorded. Analytics data is tied to announcements, not visitors.