To make your quiz more informative and efficient, you can use message variables that help you show some data on the front end.
How to use message variables #
To use the message variables, go to General Settings > Message variables, then copy and paste your preferred message variable into the corresponding text.
Put the particular message variable in the editor of your chosen field, and the corresponding text will be displayed on the front end.
For example, let’s take one of the message variables – user name. Copy and paste it into the “send email to user” field.
Put it in the editor where you want the name of the user to be displayed. Then click on the Save button.
If you haven’t published it yet, then publish your quiz.
After the user fills in his or her email and name (Kate in this example) in the Information Form, he or she will get if the “Send email to user” option is enabled. Here is what it will look like.
Where to use message variables #
Those variables can be used in the following texts:
- Result message
- Quiz pass message
- Quiz fail message
- Mail Message
- Certificate title
- Certificate body
- Interval message
- Email configuration
For example, here is the Quiz fail message field. To find it, go to Quizzes Page > particular quiz > Results Tab.
You can also find the list of message variables at the top of the particular field. Insert the chosen message variable into the text by clicking on it.
Descriptions of message variables #
Let’s see what each of the variables is for.
General Message Variables #
- %%current_date%% – This variable shows the date of passing the quiz on the front end.
- %%home_page_url%% – This variable will display the quiz’s home page URL on the front end.
- %%admin_email%% – Put this variable in the text, and the email of the user with the admin role will be shown on the front end. You can see the admin email on the WP’s Settings page.
User Message Variables #
- %%user_name%% – This variable will take the name of the user from the Information Form of the quiz and display it on the front page in the text where you have inputted the variable. For this variable to work, you first need to create an Information Form for your quiz from the User Data tab of the particular quiz. The user needs to fill in the User Name field for this variable to work. You can make that field required to surely get the data.
- %%user_email%% – For this variable to work, you again need to have an Information Form created from the User Data tab. When you put it in the editor, the email address that the user has written in the Information Form will be shown on the front end. Make the corresponding field in the Information Form required to make sure you get the user’s email.
- %%user_phone%% – Put this variable into the editor. The phone number filled in in the Information Form will be displayed on the front end. Make the Phone field required to make sure you get the needed data.
- %%user_first_name%% – This variable takes the data that the user has given during the registration of their WordPress Site. It will show the first name of the user on the front end.
- %%user_last_name%% – This variable takes the user’s last name, which was filled in during the registration of their WordPress Site. It will show the last name on the front end.
- %%user_nickname%% – Put this variable into the editor, and it will show the nickname filled in in the user’s WordPress profile on the front end.
- %%user_display_name%% – Put this variable into the editor, and the display name that is written in the user’s WordPress profile will be shown on the front end.
- %%user_wordpress_email%% – When you put this variable into the editor, the email that the user has filled in their WordPress profile will be shown on the front end.
- %%user_wordpress_roles%% – This variable shows the WordPress role of the logged-in user on the front end. Go to the Users Menu to find the user roles. If the user is not logged in, then the user role can’t be shown, and it will remain empty.
- %%user_wordpress_website%% – If you put this variable in the editor, it will display (on the front end) the website that the user has written in their WordPress profile.
- %%user_pass_time%% – This variable will show the time that the user spent to pass the quiz on the front end.
- %%user_pass_time_bar_chart%% – Put this variable into your editor (except the email fields editor), and on the front end, it will display a chart showing how much time out of the timer limit the user has spent to take the quiz. To put a timer on a quiz, go to the Settings Tab of the particular quiz and tick the Enable Timer checkbox. To put a timer on a quiz, go to the Settings Tab of the particular quiz and tick the Enable Timer checkbox.
- %%user_corrects_count%% – This variable will show the number of correct answers that the user got from the quiz on the front end.
- %%user_corrects_count_pie_chart%% – This variable will display a pie chart that shows the number of correct answers the user got on the quiz out of all the questions.
- %%wrong_answers_count%% – Put this variable into your editor, and it will show the number of questions of the quiz that the user has answered incorrectly or skipped.
- %%only_wrong_answers_count%% – This variable will display the number of incorrect answers that the user had on the quiz. The skipped questions will not be counted as incorrect answers.
- %%skipped_questions_count%% – This variable will show the number of quiz questions that the user has skipped.
- %%answered_questions_count%% – This variable will show the number of questions that the user has answered (regardless of correctness).
- %%user_id%% – If you put this variable into the editor, it will display the user’s ID on the front end.
- %%current_user_ip%% – This variable will show the current user’s IP address on the front end. The IP address doesn’t depend on the account of the user and is stored even if the user is not logged in. If you tick the Do not store IP addresses checkbox (General Settings>General>Users IP addresses), then this variable will not work, and instead, it will be empty on the front end.
- %%unique_code%% – If you put this variable into your editor, a unique code will be displayed to the user on the front end for each quiz attempt (e.g. 66E7ED30395A5). It changes every time a new attempt is made.
- %%download_certificate%% – Put this variable into the editor, and the users can download the certificate by clicking on the button from the front end.
This variable will not work if the certificate is not yet available (e.g. on the start page) and will remain empty if an option for generating a certificate is disabled. To enable, go to the E-Mail and Certificate tab of the particular quiz and enable the “Send certificate to user” or “Generate certificate without sending to user” option.
Score Message Variables #
- %%score%% – This variable will show the user’s score on the quiz on the front end.
- %%score_bar_chart%% – This variable shows a bar chart of the user’s quiz score. It doesn’t work in the editors of email fields.
- %%avg_score%% – If you put this variable into the editor, it will calculate the average of all the scores got on that particular quiz and display it on the front end.
- %%score_by_answered_questions%% – This variable will deduce the weight of the skipped or unanswered questions and calculate the score without considering those questions. The score will be displayed on the front end.
- %%interval_message%% – This variable displays the interval message on the front end. The interval message is a text for each period of the score the user gets on the quiz that is shown after completing the quiz (on the result page). To add an interval message, go to the Quizzes Page > particular quiz > Results Settings and choose intervals in the Intervals option. Then, write a text for each interval and click on the Save button.
- %%results_by_cats%% – This variable shows the score on the front end for each question category separately.
- %%results_by_cats_bar_chart%% – This variable also displays the score for each category, presented in a bar chart. The chart won’t work for the email fields.
- %%results_by_tags%% – If you put this variable into the editor, it will show the quiz scores for each question tag separately.
- %%results_by_tags_bar_chart%% – This variable will show a bar chart on the front end that presents the quiz scores for each question tag. The chart won’t work for the email fields.
- %%avg_res_by_cats%% – For this variable to work properly, go to the Quizzes Page > particular quiz > Results Settings. For the “Calculate the score” option, choose the By weight/points checkbox. The variable will calculate the average points gotten from the quiz questions for each question category and display the average value out of the maximum average value of the points for the particular category (e.g. 2.5/5).
- %%avg_res_by_cats_bar_chart%% – This variable will display the average results by categories in percentages and represent them in a bar chart. The bar chart won’t work for the email fields.
- %%avg_score_by_category%% – This variable shows the average score of each question category of the quiz that the user got.
- %%user_points%% – This variable displays how many points did the user get on the quiz. In contrast with the ‘score’ variable, this one does not calculate the score with a percentage but shows the sum of the points that are given to each question (from the Question Weight option).
- %%user_points_bar_chart%% – This variable shows a bar chart of the points the user got from the quiz. Please note that the message variable won’t work for the email fields.
- %%max_points%% – If you put this variable into your editor, it will show the number of maximum points that the user could get on the front end.
- %%keyword_count_{keyword}%% – With this variable, you can display the number of answers that the user chose with a certain keyword. You can change the keywords of the answer options for the particular questions.
Replace the {keyword} part with the keyword letter that you want. For example, let’s replace it with ‘A’ (%%keyword_count_A%%). The variable will count how many answers the user chose with an ‘A’ keyword and display it on the front end.
- %%keyword_percentage_{keyword}%% – This variable will show the percentage of your chosen keyword out of the user’s answers. Replace {keyword} with the preferred keyword. For example, %%keyword_percentage_B%% will show what percentage of the user’s answers were with the keyword ‘B.’
- %%top_keywords_count_{count}%% – With this variable, you can display the most selected keywords by the user through the quiz. It will also show how many times each keyword was used. Replace {count} with a number of the top keywords you want to show For example, %%top_keywords_count_3%% will show the top 3 keywords that the user selected and how many times each was selected.
- %%top_keywords_percentage_{count}%% – This variable shows the most selected keywords by the user. It also shows what percentage forms each keyword out of all answers of the user. Replace {count} with the number of the top keywords you want to show. For instance, %%top_keywords_percentage_3%% will show the top 3 keywords that were mostly used during the quiz with their percentage.
- %%user_keyword_point_{keyword}%% – This variable will show the total points of the particular keyword selected by the user (in case of the correct answer.) Replace {keyword} with the particular keyword. Let’s take the keyword ‘A’ as an example (%%user_keyword_point_A%%.) If the user selects two answers with the keyword ‘A,’ which are correct answers, then the total point would be the sum of the points for those answers. You can change the weight/points for each answer from the Edit page of the particular question.
- %%max_point_keyword_{keyword}%% – Replace the {keyword} part with your chosen keyword, and it will show the points that the user got out of all possible points for that particular keyword. Let’s consider there are two correct answers with the keyword ‘A’ in the quiz. Each of them is worth 5 points, and the sum of the two would be 10 points (maximum points for that keyword). If the user has selected only one of those answers, then the variable will show 5/10 as a result.
- %%user_keyword_percentage_{keyword}%% – If you Replace the {keyword} part with your chosen keyword, then it will display the percentage of the points that the user got out of all possible points for that particular keyword. In the above-mentioned example, the result would be 50%.
- %%avg_user_points%% – This variable will calculate the average of the points that the user got each time from taking the quiz.
- %%detailed_result_column_chart%% – Put this variable into the editor, and it will show a column chart on the front end with a detailed result of the question. The columns represent the number of Correct answers, Wrong answers, Only wrong answers, Skipped questions, and Answered questions. The column chart won’t work for the email fields.
- %%personality_result_by_question_ids_{CatID_1,CatID_2,CatID_3,CatID_4}%% – This variable is used to create a personality test. It displays the title and the description of your chosen question category(s). Moreover, it shows the percentage by which the user matches the particular Question Category(s) Keyword according to the keywords of the answers chosen by the user. For that, replace {CatID_1,CatID_2,CatID_3,CatID_4} with the ID(s) of your preferred question category/categories (e.g. %%personality_result_by_question_ids_3, 6%%.)
- %%question_category_name_{question_cat_ID}%% – This variable shows the name of the question category on the front end. For that, replace {question_cat_ID} with the ID of your chosen question category. Go to the Question Categories page to find the ID of the particular question category (e.g. %%question_category_name_5%%.)
- %%user_points_by_question_category_{question_cat_ID}%% – This variable shows the points that the user got for answering the questions of a particular question category in the quiz. Replace {question_cat_ID} with the chosen question category ID (e.g. %%user_points_by_question_category_5%%.) You can find it on the Question Categories page. If there are no questions from the given question category, the variable will not work.
- %%user_max_point_by_question_category_{question_cat_ID}%% – This variable will display the most points that are possible for the user to get by answering the questions of a particular question category. Replace {question_cat_ID} with your preferred question category ID (e.g. %%user_max_point_by_question_category_5%%.) To find it, go to the Question Categories page.
- %%question_category_displayed_questions_count_{question_cat_ID}%% – This variable shows the number of questions from a particular question category that were presented in the quiz. Replace {question_cat_ID} with the chosen question category ID. (e.g. %%question_category_displayed_questions_count_5%%.)
Quiz Message Variables #
- %%quiz_name%% – This variable displays the name of the quiz on the front end. To change the name of the edit, go to the Quizzes Tab > particular quiz > General Tab.
- %%quiz_id%% – Put this variable into the editor to display the ID of the quiz on the front end.
- %%avg_rate%% – This variable shows the average evaluation of the quiz from its creation date.
- %%avg_rate_stars_with_icons%% – This variable shows the average quiz evaluation rate with star icons from the quiz’s creation date. The star icons won’t work for the email fields.
- %%quiz_time%% – This variable shows the time limit for completing the quiz. To turn on the timer, go to the Settings Tab of the particular quiz and tick the Enable Timer option.
- %%questions_count%% – This variable displays the number of questions included in the quiz.
- %%quiz_creation_date%% – Put this variable into the editor to display the date on which the quiz was created.
- %%current_quiz_author%% – This variable displays the author of the quiz on the front end. Go to the Quizzes Page to check who the author is.
- %%current_quiz_page_link%% – This variable will show the link to the webpage of the current quiz.
- %%current_quiz_author_email%% – This variable will display the email taken from the quiz author’s WordPress profile.
- %%current_quiz_author_nickname%% – This variable will display the nickname of the quiz author, which is taken from their WordPress profile.
- %%quiz_image%% – This variable displays the quiz image on the front end. The quiz image is shown on the start page of the quiz and can be set from the General Tab of the particular quiz’s edit page.
- %%quiz_coupon%% – This variable displays the quiz coupons on the front end. For this variable to work, head to the Results Settings tab of the particular quiz’s edit page and enable the Enable Quiz Coupon option.
- %%result_id%% – This variable shows the ID of the result for the current user on the front end.
That’s it; these were all the message variables used in the WordPress editors to display information about the quiz.