Skip to content

E-Learning Ingest Events

Causal Foundry SDK E-Learning module consists of events for online learning platforms. You need to implement this module if your app offers learning content that may include learning content, viewing courses, attempting exams, or passing an exam to get certified.

List of Events

Event Name Type Description
Question question Track actions on user activity on a given question.
Exam exam Track events user performed while attempting the exam.
Module module Track events regarding user interaction with the module inside the app.


Question Event

To log user answers to the questions. To log this event you need to provide the question id that User has attempted and also the id for the answer the user has selected.

Format

Param Usability Format Enum Values Description
id REQUIRED STRING --- Id for the question.
action REQUIRED STRING answer, skip Action applied on the question.
answer_id REQUIRED STRING --- Id for the answer from a group of questions.
exam_id REQUIRED STRING --- Id for the exam for which the question is a part of.
meta OPTIONAL ANY --- Any additional value that is sent with the log.

Usage

    CfLogQuestionEvent.Builder()
        .setQuestionId("testQuestionId")
        .setQuestionAction(QuestionAction.answer)
        .setAnswerId("testAnswerId")
        .setExamId("testExamId")
        .build()
    let questionProperties = {
        id: "testQuestionId",
        exam_id: "testExamId",
        action: QuestionAction.Answer,
        answer_id: "testAnswerId",
    }

    CfELearn.logQuestionEvent(questionProperties)
    let questionProperties = {
        id: "testQuestionId",
        exam_id: "testExamId",
        action: QuestionAction.Answer,
        answer_id: "testAnswerId",
    }

    ELearning.logQuestionEvent(questionProperties)
{
  "type": "question",
  "props": {
    "id": "testQuestionId",
    "action": "answer",
    "answer_id": "testAnswerId",
    "exam_id": "testExamId"
  }
}


Exam Event

To log actions related to e-learning module exams. which includes the related to starting, retaking, reviewing and submit the exam. BsLogExamEvent also updates the user level if they achieved a milestone.

Format

Param Usability Format Enum Values Description
id REQUIRED STRING --- Id for the exam provided to user.
action REQUIRED STRING start, submit, result Action applied on the exam by the user.
is_passed REQUIRED BOOLEAN --- If the user passed the exam or not?
score REQUIRED FLOAT --- Total score the user achieved in the exam.
duration REQUIRED INT --- Time in seconds, user spent on the exam.
meta OPTIONAL ANY --- Any additional value that is sent with the log.

Usage

    CfLogExamEvent.Builder()
        .setExamAction(ExamAction.start)
        .setExamId("exam_exam_id")
        .setScore(90f)
        .isPassed(true)
        .build()
    let examResultProperties = {
        id: "testExamId",
        action: ExamAction.Result,
        score: 80,
        is_passed: true,
    }

    CfELearn.logExamEvent(examResultProperties)
    let examResultProperties = {
        id: "testExamId",
        action: ExamAction.Result,
        score: 80,
        is_passed: true,
    }

    ELearning.logExamEvent(examResultProperties)
{
  "type": "exam",
  "props": {
    "id": "exam_id",
    "action": "start",
    "is_passed": true,
    "score": 90.0,
    "duration": 30
  }
}


Module Event

To log actions related to e-learning modules which includes the log for user viewing the module, starting and finishing the module and also user viewing the content page as well.

Format

Param Usability Format Enum Values Description
id REQUIRED STRING --- Id for the module user is interacting.
action REQUIRED STRING view Action user if performing while interacting with the module.
progress REQUIRED INT --- Progress of user towards completing the module.
meta OPTIONAL ANY --- Any additional value that is sent with the log.

Usage

    CfLogModuleEvent.Builder()
        .setModuleId("testModuleId")
        .setModuleAction(ModuleLogAction.view)
        .setModuleProgress(60)
        .build()
    let moduleProperties = {
        id: "testModuleId",
        action: ModuleAction.View,
        progress: 90,
    }

    CfELearn.logModuleEvent(moduleProperties)
    let moduleProperties = {
        id: "testModuleId",
        action: ModuleAction.View,
        progress: 90,
    }

    ELearning.logModuleEvent(moduleProperties)
{
  "type": "module",
  "props": {
    "id": "testModuleId",
    "action": "view",
    "progress": 60
  }
}