Provides access to keyword URLs. See [Using Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

### Methods:

| Member | Type | Description |
|---|---|---|
| [clearFinalUrl()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#clearFinalUrl) | `void` | Clears the final URL of the keyword. |
| [clearFinalUrlSuffix()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#clearFinalUrlSuffix) | `void` | Clears the final URL suffix of the keyword. |
| [clearMobileFinalUrl()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#clearMobileFinalUrl) | `void` | Clears the mobile final URL of the keyword. |
| [clearTrackingTemplate()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#clearTrackingTemplate) | `void` | Clears the tracking template of the keyword. |
| [getCustomParameters()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#getCustomParameters) | `Object` | Returns the custom parameters of the keyword. |
| [getFinalUrl()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#getFinalUrl) | `String` | Returns the final URL of the keyword or `null` if there is no final URL. |
| [getFinalUrlSuffix()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#getFinalUrlSuffix) | `String` | Returns the final URL suffix of the keyword. |
| [getMobileFinalUrl()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#getMobileFinalUrl) | `String` | Returns the mobile final URL of the keyword or `null` if there is no mobile final URL. |
| [getTrackingTemplate()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#getTrackingTemplate) | `String` | Returns the tracking template of the keyword. |
| [setCustomParameters(customParameters)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#setCustomParameters_customParameters) | `void` | Sets the custom parameters of the keyword. |
| [setFinalUrl(finalUrl)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#setFinalUrl_finalUrl) | `void` | Sets the final URL of the keyword. |
| [setFinalUrlSuffix(suffix)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#setFinalUrlSuffix_suffix) | `void` | Sets the final URL suffix of the keyword. |
| [setMobileFinalUrl(mobileFinalUrl)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#setMobileFinalUrl_mobileFinalUrl) | `void` | Sets the mobile final URL of the keyword. |
| [setTrackingTemplate(trackingTemplate)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordurls#setTrackingTemplate_trackingTemplate) | `void` | Sets the tracking template of the keyword. |

## `clearFinalUrl()`

Clears the final URL of the keyword.

Clearing final URL at the keyword level will cause the final URL of the
corresponding ad to be used instead.

Please note that you should clear any tracking template or final mobile
URL that is set on the keyword before clearing the final URL, as clearing
final URL will fail with an error if either final mobile URL or tracking
template is set on this keyword.

Refer to [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

Returns nothing.

## `clearFinalUrlSuffix()`

Clears the final URL suffix of the keyword.

Returns nothing.

## `clearMobileFinalUrl()`

Clears the mobile final URL of the keyword.

Clearing mobile final URL will cause the final URL to be used instead.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

Returns nothing.

## `clearTrackingTemplate()`

Clears the tracking template of the keyword.

If you clear the tracking template specified at a lower level entity
(e.g. a keyword), and you have also specified tracking template on a higher
level entity, (e.g. the parent ad group), then Google Ads will use the
tracking template specified at the higher level entity (i.e. the ad group
level tracking template will be used). To completely clear tracking
template, it must be cleared at all levels of the hierarchy at which it was
set.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

Returns nothing.

## `getCustomParameters()`

Returns the custom parameters of the keyword.

Custom parameters enable you to create your
own [ValueTrack](https://support.google.com/google-ads/answer/2375447)
parameters that you can assign your own IDs to.

The name of a custom parameter can contain only alphanumeric characters,
and custom parameter values may not contain white space. When referring to
the custom parameter in final URLs and tracking template, you should
surround the custom parameter in braces, and prefix an underscore to its
name, e.g. `{_param}`.

You can have up to 8 custom parameters for an entity. The key and value
must not exceed 16 and 200 bytes respectively.

Custom parameters specified at a lower level entity will override the
setting specified at a higher level entity, e.g., setting custom parameters
at the ad group level overrides the setting at the campaign level.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

### Return values:

| Type | Description |
|---|---|
| `Object` | The custom parameters of the keyword as a map of the following form: `{key1: 'value1', key2: 'value2', key3: 'value3'}`. |

## `getFinalUrl()`

Returns the final URL of the keyword or `null` if there is no final URL.

The final URL represents the actual landing page for your keyword. The final URL must be the URL of the page that the user
ends up on after clicking on your ad, once all the redirects have taken
place.

Final URLs follow the same override rules as destination URLs. For
example, a final URL at the keyword level overrides a final URL at an ad
level.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

### Return values:

| Type | Description |
|---|---|
| `String` | The final URL of the keyword. |

## `getFinalUrlSuffix()`

Returns the final URL suffix of the keyword.

When [parallel
tracking](https://support.google.com/google-ads/answer/7544674) is enabled, the final URL suffix gets appended to the final
URL.

### Return values:

| Type | Description |
|---|---|
| `String` | The final URL suffix of the keyword. |

## `getMobileFinalUrl()`

Returns the mobile final URL of the keyword or `null` if there is no mobile final URL.

The mobile final URL represents the actual landing page for your keyword on a mobile device. The final mobile URL must be the URL of
the page that the user ends up on after clicking on your ad on a mobile
device, once all the redirects have taken place.

Mobile final URLs follow the same override rules as destination URLs.
For example, a mobile final URL at the keyword level overrides a mobile
final URL at an ad level.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

### Return values:

| Type | Description |
|---|---|
| `String` | The mobile final URL of the keyword. |

## `getTrackingTemplate()`

Returns the tracking template of the keyword.

You can optionally use the tracking template to specify additional
tracking parameters or redirects. Google Ads will use this template to
assemble the actual destination URL to associate with the ad.

A tracking template specified at a lower level entity will override the
setting specified at a higher level entity, e.g., a tracking template at
the ad group level overrides the setting at the campaign level.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

### Return values:

| Type | Description |
|---|---|
| `String` | The tracking template of the keyword. |

## `setCustomParameters(customParameters)`

Sets the custom parameters of the keyword.

Custom parameters enable you to create your
own [ValueTrack](https://support.google.com/google-ads/answer/2375447)
parameters that you can assign your own IDs to.

The name of a custom parameter can contain only alphanumeric characters,
and custom parameter values may not contain white space. When referring to
the custom parameter in final URLs and tracking template, you should
surround the custom parameter in braces, and prefix an underscore to its
name, e.g. `{_param}`.

You can have up to 8 custom parameters for an entity. The key and value
must not exceed 16 and 200 bytes respectively.

Custom parameters specified at a lower level entity will override the
setting specified at a higher level entity, e.g., setting custom parameters
at the ad group level overrides the setting at the campaign level.

Note that this method will replace any existing custom parameters with
the specified value.

You may pass an empty object, e.g. `setCustomParameters({})`
to clear the custom parameters of the keyword. If you clear the
custom parameters specified at a lower level entity (e.g. a keyword), and
you have also specified custom parameters on a higher level entity, (e.g.
the parent ad group), then Google Ads will use the custom parameters
specified at the higher level entity (i.e. the ad-group-level custom
parameters will be used). To completely clear custom parameters, it must be
cleared at all levels of the hierarchy at which it was set.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

Returns nothing.

### Arguments:

| Name | Type | Description |
|---|---|---|
| customParameters | `Object` | The custom parameters of the keyword as a map of the form `{key1: 'value1', key2: 'value2', key3: 'value3'}`. |

## `setFinalUrl(finalUrl)`

Sets the final URL of the keyword.

The final URL represents the actual landing page for your keyword. The final URL must be the URL of the page that the user
ends up on after clicking on your ad, once all the redirects have taken
place.

Final URLs follow the same override rules as destination URLs. For
example, a final URL at the keyword level overrides a final URL at an ad
level.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

Returns nothing.

### Arguments:

| Name | Type | Description |
|---|---|---|
| finalUrl | `String` | The final URL of the keyword. |

## `setFinalUrlSuffix(suffix)`

Sets the final URL suffix of the keyword.

When [parallel
tracking](https://support.google.com/google-ads/answer/7544674) is enabled, the final URL suffix gets appended to the final
URL.

Returns nothing.

### Arguments:

| Name | Type | Description |
|---|---|---|
| suffix | `String` | The new final URL suffix. |

## `setMobileFinalUrl(mobileFinalUrl)`

Sets the mobile final URL of the keyword.

The mobile final URL represents the actual landing page for your keyword on a mobile device. The final mobile URL must be the URL of
the page that the user ends up on after clicking on your ad on a mobile
device, once all the redirects have taken place.

Mobile final URLs follow the same override rules as destination URLs.
For example, a mobile final URL at the keyword level overrides a mobile
final URL at an ad level.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

Returns nothing.

### Arguments:

| Name | Type | Description |
|---|---|---|
| mobileFinalUrl | `String` | The mobile final URL of the keyword. |

## `setTrackingTemplate(trackingTemplate)`

Sets the tracking template of the keyword.

You can optionally use the tracking template to specify additional
tracking parameters or redirects. Google Ads will use this template to
assemble the actual destination URL to associate with the ad.

A tracking template specified at a lower level entity will override the
setting specified at a higher level entity, e.g., a tracking template at
the ad group level overrides the setting at the campaign level.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

Returns nothing.

### Arguments:

| Name | Type | Description |
|---|---|---|
| trackingTemplate | `String` | The tracking template of the keyword. |