# Google Shopping Merchant Conversions V1 Client - Class ConversionSource (1.2.0)

1.2.0 (latest) 1.1.3 1.0.0 0.3.0 0.2.1 0.1.5 Reference documentation and code samples for the Google Shopping Merchant Conversions V1 Client class ConversionSource.

Represents a conversion source owned by a Merchant account. A merchant
account can have up to 200 conversion sources.

Generated from protobuf message `google.shopping.merchant.conversions.v1.ConversionSource`

## Namespace

Google \\ Shopping \\ Merchant \\ Conversions \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ google_analytics_link` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.GoogleAnalyticsLink` Immutable. Conversion Source of type "Link to Google Analytics Property". |
| `↳ merchant_center_destination` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.MerchantCenterDestination` Conversion Source of type "Merchant Center Tag Destination". |
| `↳ name` | `string` Output only. Identifier. Generated by the Content API upon creation of a new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before the colon represent the type of conversion source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: \* \* `galk`: For GoogleAnalyticsLink sources. \* \* `mcdn`: For MerchantCenterDestination sources. |
| `↳ state` | `int` Output only. Current state of this conversion source. Can't be edited through the API. |
| `↳ expire_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete. |
| `↳ controller` | `int` Output only. Controller of the conversion source. |

### getGoogleAnalyticsLink

Immutable. Conversion Source of type "Link to Google Analytics Property".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.GoogleAnalyticsLink|null` |   |

### hasGoogleAnalyticsLink

### setGoogleAnalyticsLink

Immutable. Conversion Source of type "Link to Google Analytics Property".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.GoogleAnalyticsLink` |

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

### getMerchantCenterDestination

Conversion Source of type "Merchant Center Tag Destination".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.MerchantCenterDestination|null` |   |

### hasMerchantCenterDestination

### setMerchantCenterDestination

Conversion Source of type "Merchant Center Tag Destination".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.MerchantCenterDestination` |

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

### getName

Output only. Identifier. Generated by the Content API upon creation of a
new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before
the colon represent the type of conversion source. Content after the colon
represents the ID of the conversion source within that type. The ID of two
different conversion sources might be the same across different types. The
following type prefixes are supported:

- `galk`: For GoogleAnalyticsLink sources.

- `mcdn`: For MerchantCenterDestination sources.

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

### setName

Output only. Identifier. Generated by the Content API upon creation of a
new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before
the colon represent the type of conversion source. Content after the colon
represents the ID of the conversion source within that type. The ID of two
different conversion sources might be the same across different types. The
following type prefixes are supported:

- `galk`: For GoogleAnalyticsLink sources.

- `mcdn`: For MerchantCenterDestination sources.

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

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

### getState

Output only. Current state of this conversion source. Can't be edited
through the API.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.ConversionSource.State). |

### setState

Output only. Current state of this conversion source. Can't be edited
through the API.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.ConversionSource.State). |

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

### getExpireTime

Output only. The time when an archived conversion source becomes
permanently deleted and is no longer available to undelete.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasExpireTime

### clearExpireTime

### setExpireTime

Output only. The time when an archived conversion source becomes
permanently deleted and is no longer available to undelete.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getController

Output only. Controller of the conversion source.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Controller](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.ConversionSource.Controller). |

### setController

Output only. Controller of the conversion source.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Controller](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1.ConversionSource.Controller). |

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

### getSourceData

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