Skip to main content

JavaScript API

Once your embed script is loaded on the page, a small JavaScript API is available at window.UpdatesPage for controlling the slide-over panel programmatically.
Embeds are available on the Business plan. See Installing an Embed for setup.

Methods

Both methods take your embed ID (the same ID that appears in your embed’s script tag URL).

Open the panel

Close the panel

Using a custom trigger

By default, the embed renders its own trigger button where the script tag is placed. To use your own button, link, or menu item instead:
  1. In the dashboard, go to Account → Embeds and open your embed in the editor
  2. Set the action style to custom — this hides the default button
  3. Call window.UpdatesPage.open("<embed-id>") from your own UI

Example: open from a navigation menu

Multiple embeds

If you have more than one embed on a page, pass the ID of the embed you want to control:
Make sure the embed’s script tag has loaded before calling window.UpdatesPage — place your code after the script tag, or wait for page load.