# Google Shopping Merchant Conversions V1 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 Reference documentation and code samples for the Google Shopping Merchant Conversions V1 Client class AttributionSettings.

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

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ attribution_lookback_window_days` | `int` Required. Lookback window (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/V1.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 window (in days) used for attribution in this source.

Supported values are `7`, `30` \& `40`.

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

### setAttributionLookbackWindowDays

Required. Lookback window (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/V1.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/V1.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/V1.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/V1.AttributionSettings.ConversionType>` |

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