# Google Shopping Merchant Conversions V1beta Client - Class AttributionSettings (1.2.0)

1.2.0 (latest) 1.1.3 1.0.0 0.3.0 0.2.1 0.1.5

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Shopping Merchant Conversions V1beta Client class AttributionSettings.

Represents attribution settings for conversion sources receiving
pre-attribution data.

Generated from protobuf message `google.shopping.merchant.conversions.v1beta.AttributionSettings`

## Namespace

Google \\ Shopping \\ Merchant \\ Conversions \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ attribution_lookback_window_days` | `int` Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40. |
| `↳ attribution_model` | `int` Required. Attribution model. |
| `↳ conversion_type` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1beta.AttributionSettings.ConversionType>` Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time. |

### getAttributionLookbackWindowDays

Required. Lookback windows (in days) used for attribution in this source.

Supported values are 7, 30, 40.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setAttributionLookbackWindowDays

Required. Lookback windows (in days) used for attribution in this source.

Supported values are 7, 30, 40.

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

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

### getAttributionModel

Required. Attribution model.

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

### setAttributionModel

Required. Attribution model.

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

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

### getConversionType

Immutable. Unordered list. List of different conversion types a conversion
event can be classified as. A standard "purchase" type will be
automatically created if this list is empty at creation time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1beta.AttributionSettings.ConversionType>` |   |

### setConversionType

Immutable. Unordered list. List of different conversion types a conversion
event can be classified as. A standard "purchase" type will be
automatically created if this list is empty at creation time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest/V1beta.AttributionSettings.ConversionType>` |

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