> For the complete documentation index, see [llms.txt](https://docs.hello-lisa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hello-lisa.com/developers/guides/player-communication/message-api-reference/cta/cta-link-in-comments.md).

# 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](/developers/guides/player-communication/message-api-reference/cta.md#properties), a **Link in Comments** message includes the following additional properties:

<table><thead><tr><th width="243" valign="top">Name</th><th width="192" valign="top">Type</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>auxiliaryData</code></td><td valign="top"><pre><code>AuxiliaryData
</code></pre><p>Required.</p></td><td valign="top">The <code>auxiliaryData</code> property is an object that holds additional metadata related to a Call-to-Action. <br><br>Please refer to <a href="#auxiliarydata"><code>AuxiliaryData</code></a> for detailed information.</td></tr><tr><td valign="top"><code>ctaType</code></td><td valign="top"><pre><code>Literal
</code></pre><p>Required.</p></td><td valign="top"><code>comment</code></td></tr></tbody></table>

#### Legacy Properties

{% hint style="warning" %}
If your integration uses **LiSA Player Version 1**, none of the properties described above will be available.

For **LiSA Player Version 2**, legacy properties can be ignored.
{% endhint %}

<table><thead><tr><th width="197" valign="top">Name</th><th width="190" valign="top">Type</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>action</code></td><td valign="top"><pre><code>Literal
</code></pre><p>Required.</p></td><td valign="top"><code>click</code><br><br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> Please use <code>messageType</code> instead.</td></tr><tr><td valign="top"><code>target</code></td><td valign="top"><pre><code>Literal
</code></pre><p>Required.</p></td><td valign="top"><code>link</code><br><br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> Please use <code>messageType</code> instead.</td></tr><tr><td valign="top"><code>url</code></td><td valign="top"><pre><code>String
</code></pre><p>Required.</p></td><td valign="top"><p>The <code>url</code> field represents the destination or action associated with the CTA click event. Its value can vary based on customer implementation:</p><ul><li><strong>Standard URL</strong>: <br>A direct link to an internal or external page (e.g., <code>"https://example.com"</code>).</li><li><p><strong>Serialized JSON Object</strong>:<br>A structured representation of the action, allowing for more complex interactions — e.g. </p><pre><code>"{\"action\":\"openModal\",\"data\":{\"id\":123}}"
</code></pre></li></ul><p><br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> Please use <code>auxiliaryData.url</code> instead.</p></td></tr></tbody></table>

***

### Type Definition

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

#### `AuxiliaryData`

<table><thead><tr><th width="196" valign="top">Name</th><th width="192" valign="top">Type</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>url</code></td><td valign="top"><pre><code>Object | String
</code></pre><p>Required.</p></td><td valign="top"><p>The <code>url</code> field represents the destination or action associated with the CTA click event. Its value can vary based on customer implementation:</p><ul><li><p><strong>Standard URL</strong>: <br>A direct link to an internal or external page — e.g. </p><pre><code>https://example.com
</code></pre></li><li><p><strong>Object</strong>:<br>A structured representation of the action, allowing for more complex interactions — e.g. </p><pre class="language-json"><code class="lang-json">{
  "action": "openModal",
  "data": {
    "id": 123
  }
}
</code></pre></li></ul></td></tr></tbody></table>

```typescript
interface CommentCtaAuxiliaryData {
  url: Record<string, unknown> | string;
}
```

### Examples

#### Standard URL

```json
{
  "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

```json
{
  "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\"}"
}
```
