Viewer Interaction Events

Track your viewers interaction activity

When a viewer completes an interaction within your video, we emit a message describing the interaction.

The structure of a viewer interaction event is as follows:

event: { data: { event: "viewer_interaction", version: 1, // Version of the player events, similar to API version, info: { title: "The Video Title", currentTime: 2, // Time in video occurred at token: 'reoCjremf', // Unique identifier for a video data: { interaction_id: 'xxxxx' // Unique identifier of interaction interaction_type: 'click', // Click or reply interaction_value: 'Buy now' // Value of interaction parent_id: 'zzzzz' // Unique identifier of parent interaction parent_type: 'button' // Type of parent interaction (button, hotspot, question, etc) parent_value: 'Buy now'// Value of parent interaction. Question prompt, button label, etc. question_style: null, // If parent was question, this contiains the type, has_correct_answer: null, // If parent was question, indicates whether correctness was set answered_correctly: null // If parent was question and correctness was set, indicates whether viewer answered correctly internal_label: null // If parent had a unique JS identifier internal label for tracking } } } }
  • Available values for interaction_value are 'click' and 'reply'.
    • A free response question will have a value of 'reply'.
    • All other interactions will have a type of 'click'.
  • Available values for parent_type are 'button', 'question', 'image', 'text', 'hotspot'.
  • Available values for question_style are 'free', 'multiple', 'all', 'number', 'poll', 'likert', 'select', 'rating', 'voice', 'video', 'date', 'draw' .

📘

Get in Touch

Need help or want to know more about JavaScript Events for Mindstamp? We're here for you! Contact engineering@mindstamp.com to learn more.