JS Events

Each Riddle type has the same set of events, making it easy to write a general event listener that will work with all Riddles. The events sent by a Riddle are listed in the table below. Along with the event action, Riddle will send an event name to specify the action. For example, the Block_View event will send the name of the block that was viewed as the event name. The CoreMetrics event will send the type of event as the event name.

JS events breakdown

EventEvent actionEvent name
Core Metrics that you can also see on the analyze / statistics screen in the Riddle creator. Events can be Start, View, etc.CoreMetricsView
Tracked on the first user interaction (e.g. a click, typing)CoreMetricsStart
Tracked when the user views their result pageCoreMetricsFinish
Block viewed. A block was loaded and displayed to the userBlock_View
Block submitted - either an answer option was chosen or the next button was clicked in a question blockBlock_Submit
Tracked when the user clicks 'skip' at a blockBlock_Skip
Click on "Next" buttonBlock_Next
Form or single form field submittedForm_Submit
Send form data (user inputs)Form_Submit
Form or single form field skippedForm_Skip
Call to action button clickedCta
Social Shares. A social share button was clicked and a social share was initiatedSocial
Lead Settings events send data such as cookies accepted as the event nameLeadSettings
Data layer variablesdataLayer_{Data Layer Key}

Unless you are using your own custom tracking script, you can use these events straight away with the most common tracking tools such as Meta Pixel (formerly Facebook Pixel), Google Analytics, Google Tag Manager, or Matomo.

Please refer to our Custom tracking page to learn more about the tools and also get sample code that will get you started working with Riddle Events.

JS events properties

Every event that happens while someone plays a Riddle is made up of different properties. Event properties/event property names will only appear or contain data if they are applicable to that block.

Here is a breakdown of these properties:

Event propertyEvent property name
Same for every Riddle to identify a particular Riddle's event, also useful for external analytics toolscategory
General short name for event that happens, slightly more detailed than categoryaction
More detailed than action, e.g. View, Start, Finishname
The contents of the answer selectedanswer
Form data that is filled out as JSONformAnswers
The text entered into the description field in the CreatorblockDescription
The number assigned to the block in the CreatorblockId
The text entered into the title field in the CreatorblockTitle
The sort of block used hereblockType
Everything in a block, e.g. title, questions, images as JSONblockContent
Configurated block options as JSONblockOptions
The Riddle type used hereblockTypeGroup
true or false to denote whether this is a 2.0 or 1.0 RiddleisRiddle2Event
The accumulative milliseconds spent on the Riddle in the iframeplayTimeInMilliseconds
The unique ID automatically assigned to the Riddle in the CreatorriddleId
Riddle data variables are sent with every event if enabledriddleDataLayer