config
The session configuration. Setting it starts the panel config request and builds the panels.
Type
assocArray
Fields
| Key | Type | Required | Description |
|---|---|---|---|
siteID | string | Yes | The Maestro site ID. It also picks the Maestro environment the SDK talks to. |
pageId | string or array | One of pageId, eventId | The Maestro page ID, or several. |
eventId | string or array | One of pageId, eventId | The Maestro event ID, or several. Used instead of pageId when both are set. |
useProdEnv | boolean | No | false points panels at their test APIs and shows a debug panel when no panel is supported. Default true. Never changes the Maestro environment. |
authToken | string | No | The viewer's auth token, for panels that call authenticated APIs. |
swid | string | No | The viewer's user ID, for panels that need it. |
hidePanelSelector | boolean | No | true hides the tab bar when the config has a single panel. Default false. |
showHelloWorld | boolean | No | true skips the panel config request and shows the debug panel. For development. |
showDemoPanel | boolean | No | true 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
configfirst in a session, thensetDataToPaneland the other fields. See Getting Started. - Setting
configagain starts over with the new values: to switch content, set it with the new IDs. - Empty strings count as missing. Without
siteID, or without bothpageIdandeventId, the config is rejected before any request and the reason is reported onerrorInformation. - A missing
authTokenorswidis also reported onerrorInformation; the config still loads. - A
siteIDthat belongs to no Maestro environment loads no panels.