CTA — Link in Comments

The LiSA Player generates a message whenever a link in the comments is clicked. This is particularly useful in native app environments, where opening a URL in a browser requires special handling.

This message is sent by the LiSA Player to the host app / environment.

Properties

Along with all standard CTA message properties, a Link in Comments message includes the following additional properties:

Name
Type
Description

auxiliaryData

AuxiliaryData

Required.

The auxiliaryData property is an object that holds additional metadata related to a Call-to-Action. Please refer to AuxiliaryData for detailed information.

ctaType

Literal

Required.

comment

Legacy Properties

Name
Type
Description

action

Literal

Required.

click ⚠️ Please use messageType instead.

target

Literal

Required.

link ⚠️ Please use messageType instead.

url

String

Required.

The url field represents the destination or action associated with the CTA click event. Its value can vary based on customer implementation:

  • Standard URL: A direct link to an internal or external page (e.g., "https://example.com").

  • Serialized JSON Object: A structured representation of the action, allowing for more complex interactions — e.g.

    "{\"action\":\"openModal\",\"data\":{\"id\":123}}"

⚠️ Please use auxiliaryData.url instead.


Type Definition

interface CommentCtaMessage extends Omit<
  CtaMessage,
  'auxiliaryData' | 'ctaType'
> {
  auxiliaryData: CommentCtaAuxiliaryData;
  ctaType: 'comment';
}

AuxiliaryData

Name
Type
Description

url

Object | String

Required.

The url field represents the destination or action associated with the CTA click event. Its value can vary based on customer implementation:

  • Standard URL: A direct link to an internal or external page — e.g.

    https://example.com
  • Object: A structured representation of the action, allowing for more complex interactions — e.g.

    {
      "action": "openModal",
      "data": {
        "id": 123
      }
    }
interface CommentCtaAuxiliaryData {
  url: Record<string, unknown> | string;
}

Examples

Standard URL

{
  "clockDriftInMs": 0,
  "auxiliaryData": {
    "url": "https://my-domain.com"
  },
  "ctaType": "comment",
  "mediaItemId": "9f333331-45cb-4289-8bcd-9023c1871111",
  "mediaItemType": "live",
  "messageType": "lsc:cta:click",
  "progress": {
    "bufferedTimeInMs": 636036,
    "currentTimeInMs": 619609,
    "durationInMs": 4616000,
    "elapsedTimeInMs": 22761,
    "isLive": true,
    "isPlaying": true,
    "skipTimeInMs": 600000,
    "visitorDwellTimeInMs": 23882
  },
  "sender": "LiSA",
  
  "action": "click",
  "additional":  {
    "showDate": "2025-01-15T18:00:00.000Z",
    "showId": "9f333331-45cb-4289-8bcd-9023c1871111",
    "showName": "Shred the Slopes: The Ultimate Ski Gear Guide 🎿❄️",
    "showState": "live",
    "showTitle": "Shred the Slopes: The Ultimate Ski Gear Guide 🎿❄️",
    "playing": true,
    "time": 620
  },
  "target": "link",
  "url": "https://my-domain.com"
}

Object Structure

{
  "auxiliaryData": {
    "url": {
      "action": "quickView",
      "uri": "/path/to/page"
    }
  },
  "ctaType": "comment",
  "mediaItemId": "9f333331-45cb-4289-8bcd-9023c1871111",
  "mediaItemType": "live",
  "messageType": "lsc:cta:click",
  "progress": {
    "bufferedTimeInMs": 636036,
    "currentTimeInMs": 619609,
    "durationInMs": 4616000,
    "elapsedTimeInMs": 22761
    "isLive": true,
    "isPlaying": true,
    "skipTimeInMs": 600000,
    "visitorDwellTimeInMs": 23882
  },
  "sender": "LiSA",

  "action": "click",
  "additional":  {
    "showDate": "2025-01-15T18:00:00.000Z",
    "showId": "9f333331-45cb-4289-8bcd-9023c1871111",
    "showName": "Shred the Slopes: The Ultimate Ski Gear Guide 🎿❄️",
    "showState": "live",
    "showTitle": "Shred the Slopes: The Ultimate Ski Gear Guide 🎿❄️",
    "playing": true,
    "time": 620
  },
  "target": "link",
  "url": "{\"action\":\"quickView\",\"uri\":\"/path/to/page\"}"
}

Last updated