Skip to main content

config

The session configuration. Setting it starts the panel config request and builds the panels.

Type​

assocArray

Fields​

KeyTypeRequiredDescription
siteIDstringYesThe Maestro site ID. It also picks the Maestro environment the SDK talks to.
pageIdstring or arrayOne of pageId, eventIdThe Maestro page ID, or several.
eventIdstring or arrayOne of pageId, eventIdThe Maestro event ID, or several. Used instead of pageId when both are set.
useProdEnvbooleanNofalse points panels at their test APIs and shows a debug panel when no panel is supported. Default true. Never changes the Maestro environment.
authTokenstringNoThe viewer's auth token, for panels that call authenticated APIs.
swidstringNoThe viewer's user ID, for panels that need it.
hidePanelSelectorbooleanNotrue hides the tab bar when the config has a single panel. Default false.
showHelloWorldbooleanNotrue skips the panel config request and shows the debug panel. For development.
showDemoPanelbooleanNotrue skips the panel config request and shows three demo tabs (Stats, Key Plays and Shop) from data bundled in the SDK; siteID, pageId and eventId are not required. Only in the 4.5.28-demo package.

Keys are case-insensitive (eventID and eventId are the same key). The whole object is passed to every panel, so a panel can read further keys it documents.

Example​

m.maestro.config = {
siteID: "YOUR_SITE_ID"
pageId: "YOUR_PAGE_ID"
useProdEnv: true
}

Notes​

  • Set config first in a session, then setDataToPanel and the other fields. See Getting Started.
  • Setting config again starts over with the new values: to switch content, set it with the new IDs.
  • Empty strings count as missing. Without siteID, or without both pageId and eventId, the config is rejected before any request and the reason is reported on errorInformation.
  • A missing authToken or swid is also reported on errorInformation; the config still loads.
  • A siteID that belongs to no Maestro environment loads no panels.