# Event Reference

### Canonical Shared Event Schema

All domain-specific events include this shared base along with domain-specific extensions.

```typescript
interface AnalyticsEvent {
  // Shared identifiers & timing
  
  /**
   * The difference between the client clock vs. server clock,
   * represented in milliseconds.
   */
  clockDriftInMs: number;
  /**
   * ISO 8601 timestamp from client clock, representing the timestamp
   * when the event was fired.
   */
  eventDate: string;
  /**
   * Universally unique event id, in UUID v4 format.
   */
  eventId: string;
  /**
   * The distinct, domain-specific type of event.
   */
  eventType: string;
  /**
   * The current visitor's locale setting in a multi-language environment.
   */
  locale?: string;
  /**
   * Distinct store identifier in a multi-store/multi-region environment.
   */
  storeRef?: string;
  /**
   * The distinct visitor identifier, if provided by the host app or
   * environment.
   */
  visitorExternalId?: string;
  /**
   * The universally, LiSA-assigned visitor identifier,
   * in UUID v4 format.
   */
  visitorId?: string;
  /**
   * The universally, LiSA-assigned visitor session identifier,
   * in UUID v4 format.
   */
  visitorSessionId?: string;

  // If applicable to the event
  
  /**
   * The universally unique identifier of the media item,
   * this event is associated with, in UUID v4 format.
   */
  mediaItemId?: string;
  /**
   * The distinct type of media item, this event is associated with.
   */
  mediaItemType?: 'live' | 'replay' | 'story';
  /**
   * An object, representing the current media item's playback progress.
   */
  progress?: {
    /**
     * Indicates, whether the current media item is a live stream or
     * recorded.
     */
    isLive: boolean;
    /**
     * Indicates whether the current media item playback is active.
     */
    isPlaying: boolean;
    /**
     * The current media item's playback position,
     * represented in milliseconds.
     */
    currentTimeInMs: number;
    /**
     * The current media item's total duration (-1 for live),
     * represented in milliseconds.
     */
    durationInMs: number;
    /**
     * The accumulated watch time, represented in milliseconds.
     */
    elapsedTimeInMs: number;
  };
}
```

{% hint style="warning" %}
Domain-specific events (e.g., product clicks) augment this with their own fields; those go into contextData as well or into commerce-specific variables when appropriate.
{% endhint %}

### Events

<table><thead><tr><th valign="top">Event Type</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><a href="comments#lsc-comments-audience-join"><code>lsc:comments:audience:join</code></a></td><td>Visitor joins the chat during a live stream.</td></tr><tr><td valign="top"><a href="comments#lsc-comments-audience-comment"><code>lsc:comments:audience:comment</code></a></td><td>Visitor adds a comment during a live stream.</td></tr><tr><td valign="top"><a href="event-reference/media"><code>lsc:media:complete</code></a></td><td>Playback of the current media item has ended.</td></tr><tr><td valign="top"><a href="event-reference/media"><code>lsc:media:emoji</code></a></td><td>Visitor reacted to the media item with an emoji.</td></tr><tr><td valign="top"><a href="event-reference/media"><code>lsc:media:impression</code></a></td><td>Visitor opened the media item.</td></tr><tr><td valign="top"><a href="event-reference/media"><code>lsc:media:pause</code></a></td><td>Playback of the current media item has paused.</td></tr><tr><td valign="top"><a href="event-reference/media"><code>lsc:media:play</code></a></td><td>Playback of the current media item started.</td></tr><tr><td valign="top"><a href="event-reference/media"><code>lsc:media:resume</code></a></td><td>Playback of the current media item resumed.</td></tr><tr><td valign="top"><a href="products#lsc-product-add-to-cart"><code>lsc:product:add-to-cart</code></a></td><td>Visitor added a product to their cart.</td></tr><tr><td valign="top"><a href="products#lsc-product-add-to-wishlist"><code>lsc:product:add-to-wishlist</code></a></td><td>Visitor added a product to their wishlist.</td></tr><tr><td valign="top"><a href="products#lsc-product-click"><code>lsc:product:click</code></a></td><td>Visitor clicked a product to see the product details.</td></tr><tr><td valign="top"><a href="products#lsc-product-emoji"><code>lsc:product:emoji</code></a></td><td>Visitor reacted to the product with an emoji.</td></tr><tr><td valign="top"><a href="products#lsc-product-impression"><code>lsc:product:impression</code></a></td><td>Product card appeared in the visitor's viewport for the first time.</td></tr><tr><td valign="top"><a href="social-sharing#lsc-share-cancel"><code>lsc:share:cancel</code></a></td><td>Visitor cancelled social sharing through their device's native sharing options.</td></tr><tr><td valign="top"><a href="social-sharing#lsc-share-click"><code>lsc:share:click</code></a></td><td>Visitor clicked a social sharing target CTA.</td></tr><tr><td valign="top"><a href="social-sharing#lsc-share-complete"><code>lsc:share:complete</code></a></td><td>Visitor completed social sharing through their device's native sharing options.</td></tr><tr><td valign="top"><a href="stickers#lsc-sticker-click"><code>lsc:sticker:click</code></a></td><td>Visitor clicked a sticker.</td></tr><tr><td valign="top"><a href="stickers#lsc-sticker-impression"><code>lsc:sticker:impression</code></a></td><td>Sticker appeared in the visitor's viewport for the first time.</td></tr><tr><td valign="top"><a href="stickers#lsc-sticker-poll-vote"><code>lsc:sticker:poll:vote</code></a></td><td>Visitor submitted their vote on a poll sticker.</td></tr><tr><td valign="top"><a href="stickers#lsc-sticker-voucher-claim"><code>lsc:sticker:voucher:claim</code></a></td><td>Visitor claimed the voucher code from a voucher sticker.</td></tr></tbody></table>
