Subscribe to JS events from your Tolstoy Widget or Embedded Player
window.postMessage()
to post event from the embedded iframe to the parent hosting site, for more information see Window.postMessage()
Example of using an event:
name
attribute, In addition all events will send:
accountId
- Your account IDprojectId
- Your project IDvideoName
- The name of the first videoanonymousId
- Viewer IDtolstoyStarted
- Start button clicked for the first time
videoLoaded
- Video starts to play
feedScroll
- Swipe to next video
clickViewProduct
- Click to view product detials
tolstoyAnswerClicked
- One of the question’s answers was clicked
tolstoyInputSubmit
- The free text form was submitted
tolstoyLeadFormSubmit
- One of the steps in the lead form was submitted
email
(Nullable) - The email that the user submittedname
(Nullable) - The name that the user submittedphone
(Nullable) - The phone number that the user submittedcustomFields
(Nullable) - A list of the custom fields that you’ve added to the form (each object has the custom key and the user’s input value)tolstoyReachedEnd
- The user completed to watch the tolstoy and reached the end