Listen on page result event

Two simple event listener examples.


Example 1 triggers a JavaScript function once Riddle iframe result page or lead form is loaded.

Example 2 triggers a JavaScript function and shows a hidden text once Riddle iframe result page or lead form is loaded.

 

We are working on a full list of events but until that is finished, here is an easy way to see all the events your Riddle is generating (please note that the events are different for each Riddle type).

Just add this line of code to your JavaScript to log all events to your browser console:


The 2 most popular events are:

riddleData.action === ‘view-quiz-result’ -> fired when the last question of the quiz was answered

event.data.riddleEvent.label == “INSERT NAME OF Personality Test Result Title” -> fires if a particular result of a personality test was achieved