# Interface CompanionAd

*** ** * ** ***

Represents a companion ad.

| Methods ||
|---|---|
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.CompanionAd#google.ima.CompanionAd.getAdSlotId` | Returns the ad slot id for this companion. |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.CompanionAd#google.ima.CompanionAd.getContent` | Returns the HTML content for the companion ad that can be added to the publisher page. |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.CompanionAd#google.ima.CompanionAd.getContentType` | Returns the content type of the Companion Ad. |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.CompanionAd#google.ima.CompanionAd.getHeight` | Returns the height of the companion in pixels. |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.CompanionAd#google.ima.CompanionAd.getWidth` | Returns the width of the companion in pixels. |

## Methods

*** ** * ** ***

### getAdSlotId

`getAdSlotId(): string` Returns the ad slot id for this companion.

| Returns ||
|---|---|
| `string` | The ad slot id for this companion. |

*** ** * ** ***

### getContent

`getContent(): string` Returns the HTML content for the companion ad that can be added to the publisher page.

| Returns ||
|---|---|
| `string` | The HTML content. |

*** ** * ** ***

### getContentType

`getContentType(): string` Returns the content type of the Companion Ad.

| Returns ||
|---|---|
| `string` | The content type of the Companion Ad. This may return null if the content type is not known (such as in the case of a VAST HTMLResource or IFrameResource). |

*** ** * ** ***

### getHeight

`getHeight(): number` Returns the height of the companion in pixels.

| Returns ||
|---|---|
| `number` | The height of the companion in pixels. |

*** ** * ** ***

### getWidth

`getWidth(): number` Returns the width of the companion in pixels.

| Returns ||
|---|---|
| `number` | The width of the companion in pixels. |