# Google Ads Data Manager V1 Client - Class CustomVariable (0.5.0)

0.5.0 (latest) 0.4.0 0.3.1 0.2.0 0.1.2 Reference documentation and code samples for the Google Ads Data Manager V1 Client class CustomVariable.

Custom variable for ads conversions.

Generated from protobuf message `google.ads.datamanager.v1.CustomVariable`

## Namespace

Google \\ Ads \\ DataManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ variable` | `string` Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored. |
| `↳ value` | `string` Optional. The value to store for the custom variable. |
| `↳ destination_references` | `string[]` Optional. Reference string used to determine which of the [Event.destination_references](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Event#_Google_Ads_DataManager_V1_Event__getDestinationReferences__) the custom variable should be sent to. If empty, the [Event.destination_references](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Event#_Google_Ads_DataManager_V1_Event__getDestinationReferences__) will be used. |

### getVariable

Optional. The name of the custom variable to set. If the variable is not
found for the given destination, it will be ignored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setVariable

Optional. The name of the custom variable to set. If the variable is not
found for the given destination, it will be ignored.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getValue

Optional. The value to store for the custom variable.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setValue

Optional. The value to store for the custom variable.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestinationReferences

Optional. Reference string used to determine which of the
[Event.destination_references](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Event#_Google_Ads_DataManager_V1_Event__getDestinationReferences__)
the custom variable should be sent to. If empty, the
[Event.destination_references](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Event#_Google_Ads_DataManager_V1_Event__getDestinationReferences__)
will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDestinationReferences

Optional. Reference string used to determine which of the
[Event.destination_references](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Event#_Google_Ads_DataManager_V1_Event__getDestinationReferences__)
the custom variable should be sent to. If empty, the
[Event.destination_references](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Event#_Google_Ads_DataManager_V1_Event__getDestinationReferences__)
will be used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |