Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.gotolstoy.com/llms.txt

Use this file to discover all available pages before exploring further.

Tolstoy’s player uses 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:
window.addEventListener("message", (message) => {
  if (message.data.name === "tolstoyStarted") {
    console.log("Tolsoty Started", message.data);
  }
});
All events will send the event name in the name attribute, In addition all events will send:
  • accountId - Your account ID
  • projectId - Your project ID
  • anonymousId - Viewer ID

Core Events

Event NameDescription
tolstoyStartedStart button clicked for the first time
pageViewPage viewed
embedViewElement in view
videoLoadedVideo starts to play
videoPauseVideo paused
videoResumeVideo resumed
videoReplayVideo replayed
videoSeekedVideo seeked
videoUnmutedVideo unmuted
videoWatchedVideo watched completion event
feedPlayFeed started playing
feedPauseFeed paused
feedScrollSwipe to next video
clickViewProductClick to view product details
shareClickShare clicked
tolstoyProductCardClickProduct card clicked
tolstoyAddToCartAdd to cart triggered

Widget Lifecycle Events

Event NameDescription
tolstoyWidgetReadyWidget ready
tolstoyWidgetOpenWidget opened
tolstoyWidgetCloseWidget closed
tolstoyModalCloseModal closed

Interactive Events

Event NameDescription
tolstoyAnswerClickedCTA button clicked
tolstoyInputSubmitForm input submitted
tolstoyLeadFormSubmitLead form submitted
tolstoyReachedEndUser reached end