Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sleekplan.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Popups let you ask for feedback at the right moment without forcing users to open the widget themselves. Call $sleek.showPopup() to display a satisfaction survey (CSAT), a general feedback prompt, or a changelog announcement anywhere in your user’s journey.

Show a popup

$sleek.showPopup(type, message, data, settings);

Parameters

body.type
string
required
The type of popup to display. Must be one of:
  • satisfaction — A CSAT (Customer Satisfaction) rating prompt
  • feedback — A general feedback submission prompt
  • changelog — A changelog announcement popup
body.message
string
A custom message to display inside the popup. If omitted, Sleekplan uses the default message configured in your workspace settings.
body.data
object
Additional data for the popup. For satisfaction popups, pass a group key to tag the CSAT response with a specific group name:
{ "group": "onboarding" }
body.settings
object
Custom settings to override the popup’s default behavior for this specific call.

Satisfaction (CSAT)

Use the satisfaction type to ask users to rate their experience. Responses are recorded as CSAT scores in your Sleekplan dashboard.
// Basic CSAT prompt with default message
$sleek.showPopup('satisfaction');

// With a custom message
$sleek.showPopup(
  'satisfaction',
  'How satisfied are you with your experience today?'
);

// Tagged CSAT — group responses under "checkout"
$sleek.showPopup(
  'satisfaction',
  'How was your checkout experience?',
  { group: 'checkout' }
);

Feedback

Use the feedback type to invite users to submit a new feedback item directly from the popup.
// Basic feedback prompt with default message
$sleek.showPopup('feedback');

// With a custom message encouraging specific input
$sleek.showPopup(
  'feedback',
  'Do you have ideas for improving this feature?'
);

Changelog

Use the changelog type to surface a recent update announcement as a popup. This is useful for drawing attention to new features without requiring users to open the full changelog view.
// Show a changelog announcement popup
$sleek.showPopup('changelog');

// With a custom intro message
$sleek.showPopup(
  'changelog',
  'Here is what we shipped this week:'
);
Each changelog announcement is shown to a given user only once. After the first display, a one-hour cool-down period applies before another announcement can appear. This prevents consecutive announcements from feeling intrusive.

Trigger popups at the right moment

The most effective popups appear at natural moments in the user’s session rather than immediately on page load. Here are common patterns:
function onExportComplete() {
  // Trigger a CSAT prompt after the user exports a report
  $sleek.showPopup(
    'satisfaction',
    'How was your export experience?',
    { group: 'export' }
  );
}
// Ask for feedback after the user has been on the page for 60 seconds
setTimeout(function () {
  $sleek.showPopup(
    'feedback',
    'Any thoughts on what you have seen so far?'
  );
}, 60000);
if (currentUser.isFirstLoginAfterRelease) {
  $sleek.showPopup(
    'changelog',
    'We shipped something new since your last visit:'
  );
}
Avoid calling showPopup() on every page load. Overuse will train users to dismiss prompts without reading them, reducing response quality. Trigger popups based on meaningful events or session milestones.