reports - Initialization - Reports API

Reports API Initialization

reports

Defines the reports to be rendered and their configuration.

You would want to use this to choose the reports you want to view and set their configuration.

See Report types for a full list of reports and their configuration options.

Examples

var initializationOptions = {
    "reports": [
        {
            "id": "report-1",
            "type": "sessions-list",
            // See the "Sessions List Report" for more options
        },
        {
            "id": "report-2",
            "type": "sessions-list-by-item",
            // See the "Sessions List by Item Report" for more options
        },
        {
            "id": "report-3",
            "type": "session-detail-by-item",
            "session_id": "123e4567-e89b-12d3-a456-426655440000",
            "user_id": "aeee19fb-4e7b-435c-92f9-d93a1099988b"
        },
        // ...
    ]
    // ...
};

/* For each report type, the respective container element must also exist on the page, for example:
    <span class="learnosity-report" id="report-1"></span>
    <span class="learnosity-report" id="report-2"></span>
    <span class="learnosity-report" id="report-3"></span>
*/

Values

Attribute path reports

Type array[ReportObject]

Properties

  • ReportObject object

    A configuration object used for the initialization of an individual report.

    • id string

      A unique identifier for this report. An element with this ID must exist on the page to render the report.

    • type string

      The type of report to render. See Report types for a full list of reports types.

Related articles

  • See Report types for a full list of reports and their configuration options.

this is a mandatory property.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.