Use extended method of tracking the end of the quiz

Introduction

"Use extended method of tracking the end of the quiz" is available to monitor when users complete a quiz at a pre-defined placeholder within the Awareness template. This option can be found on the Awareness Template editing page.

Configuration

The default state of this feature is disabled.

To activate this method, add a call to the additional function lucyQuizEnd() without any parameters. Call this function after the user answers the last question in your desired quiz.

Using the awareness template "Internet Security" as an example:

Navigate to Templates -> Awareness Templates

Select "Edit Template"

Select "Content Template"

To enhance the "Internet Security" template, integrate the lucyQuizEnd() function into the source code to process quiz answers. The quiz consists of 9 questions, aiming to identify users who correctly answer at least 5. Activate the "Use extended method of tracking the end of the quiz" option in the Website section of the Awareness Settings for the campaign.

Use your "File" drop-down to navigate to the correct file javascript file game.js

  1. Add a new variable correctAnswerCount to keep track of the number of correct answers:

  1. Find the place in the code where the function lucyQuizAnswer() is called and insert a call to the function lucyQuizEnd() after it with the condition as shown below:

  1. Save the template and run the campaign. After 5 quiz questions are answered correctly, the recipient will be marked as "Trained".

Advanced Functions

  • lucyQuizStart(quizNumber, countQuestions, errorHandler) Starts a quiz for the current user and tracks the time when the quiz started. Useful for templates with randomly sorted questions and a variable number of questions.

  • lucySetVariable(varName, varValue, errorHandler) Permanently saves text data for the current user.

  • lucyGetVariable(varName, successHandler, errorHandler) Retrieves previously saved variables by name.

Troubleshooting

Issue: Lucy marks recipients as 'Trained' without any quiz answers given. Solution: Enable the "Quiz" option within the Website section of the Awareness Settings in the campaign.

Issue: Lucy does not mark recipients as 'Trained' despite receiving positive quiz answers. Solution: Disable the "Extended method of tracking the end of the quiz" option within the Website section of the Awareness Settings in the campaign, or adjust your awareness template accordingly.

Last updated

Was this helpful?