# Google Ads Data Manager V1 Client - Class Event (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 Event.

An event representing a user interaction with an advertiser's website or app.

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

## Namespace

Google \\ Ads \\ DataManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ destination_references` | `string[]` Optional. Reference string used to determine the destination. If empty, the event will be sent to all [destinations](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.IngestEventsRequest#_Google_Ads_DataManager_V1_IngestEventsRequest__getDestinations__) in the request. |
| `↳ transaction_id` | `string` Optional. The unique identifier for this event. Required for events sent as an additional data source for tag conversions. |
| `↳ event_timestamp` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Required. The time the event occurred. |
| `↳ last_updated_timestamp` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Optional. The last time the event was updated. |
| `↳ user_data` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserData` Optional. Pieces of user provided data, representing the user the event is associated with. |
| `↳ consent` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Consent` Optional. Information about whether the associated user has provided different types of consent. |
| `↳ ad_identifiers` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.AdIdentifiers` Optional. Identifiers and other information used to match the conversion event with other online activity (such as ad clicks). |
| `↳ currency` | `string` Optional. The currency code associated with all monetary values within this event. |
| `↳ conversion_value` | `float` Optional. The conversion value associated with the event, for value-based conversions. |
| `↳ conversion_count` | `float` Optional. The conversion quantity associated with the event, for counting-based conversions. |
| `↳ event_source` | `int` Optional. Signal for where the event happened (web, app, in-store, etc.). |
| `↳ event_device_info` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.DeviceInfo` Optional. Information gathered about the device being used (if any) when the event happened. |
| `↳ cart_data` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.CartData` Optional. Information about the transaction and items associated with the event. |
| `↳ custom_variables` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.CustomVariable>` Optional. Additional key/value pair information to send to the conversion containers (conversion action or FL activity). |
| `↳ experimental_fields` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ExperimentalField>` Optional. A list of key/value pairs for experimental fields that may eventually be promoted to be part of the API. |
| `↳ user_properties` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserProperties` Optional. Advertiser-assessed information about the user at the time that the event happened. |
| `↳ event_name` | `string` Optional. The name of the event. Required for GA4 events. |
| `↳ client_id` | `string` Optional. A unique identifier for the user instance of a web client for this GA4 web stream. |
| `↳ user_id` | `string` Optional. A unique identifier for a user, as defined by the advertiser. |
| `↳ additional_event_parameters` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventParameter>` Optional. A bucket of any [event parameters](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) to be included within the event that were not already specified using other structured fields. |
| `↳ third_party_user_data` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserData` Optional. The same type of data provided in user_data, but explicitly flagged as being provided as owned by a third-party and not first-party advertiser data. |
| `↳ event_location` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventLocation` Optional. Information gathered about the location of the user when this event occurred. |
| `↳ app_instance_id` | `string` Optional. A unique identifier for the user instance of an app client for this GA4 app stream. |

### getDestinationReferences

Optional. Reference string used to determine the destination. If empty, the
event will be sent to all
[destinations](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.IngestEventsRequest#_Google_Ads_DataManager_V1_IngestEventsRequest__getDestinations__)
in the request.

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

### setDestinationReferences

Optional. Reference string used to determine the destination. If empty, the
event will be sent to all
[destinations](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.IngestEventsRequest#_Google_Ads_DataManager_V1_IngestEventsRequest__getDestinations__)
in the request.

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

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

### getTransactionId

Optional. The unique identifier for this event. Required for events sent as
an additional data source for tag conversions.

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

### setTransactionId

Optional. The unique identifier for this event. Required for events sent as
an additional data source for tag conversions.

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

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

### getEventTimestamp

Required. The time the event occurred.

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

### hasEventTimestamp

### clearEventTimestamp

### setEventTimestamp

Required. The time the event occurred.

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

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

### getLastUpdatedTimestamp

Optional. The last time the event was updated.

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

### hasLastUpdatedTimestamp

### clearLastUpdatedTimestamp

### setLastUpdatedTimestamp

Optional. The last time the event was updated.

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

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

### getUserData

Optional. Pieces of user provided data, representing the user the event is
associated with.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserData|null` |   |

### hasUserData

### clearUserData

### setUserData

Optional. Pieces of user provided data, representing the user the event is
associated with.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserData` |

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

### getConsent

Optional. Information about whether the associated user has provided
different types of consent.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Consent|null` |   |

### hasConsent

### clearConsent

### setConsent

Optional. Information about whether the associated user has provided
different types of consent.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Consent` |

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

### getAdIdentifiers

Optional. Identifiers and other information used to match the conversion
event with other online activity (such as ad clicks).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.AdIdentifiers|null` |   |

### hasAdIdentifiers

### clearAdIdentifiers

### setAdIdentifiers

Optional. Identifiers and other information used to match the conversion
event with other online activity (such as ad clicks).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.AdIdentifiers` |

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

### getCurrency

Optional. The currency code associated with all monetary values within this
event.

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

### setCurrency

Optional. The currency code associated with all monetary values within this
event.

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

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

### getConversionValue

Optional. The conversion value associated with the event, for value-based
conversions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasConversionValue

### clearConversionValue

### setConversionValue

Optional. The conversion value associated with the event, for value-based
conversions.

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

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

### getConversionCount

Optional. The conversion quantity associated with the event, for
counting-based conversions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasConversionCount

### clearConversionCount

### setConversionCount

Optional. The conversion quantity associated with the event, for
counting-based conversions.

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

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

### getEventSource

Optional. Signal for where the event happened (web, app, in-store, etc.).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [EventSource](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventSource). |

### setEventSource

Optional. Signal for where the event happened (web, app, in-store, etc.).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [EventSource](https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventSource). |

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

### getEventDeviceInfo

Optional. Information gathered about the device being used (if any) when
the event happened.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.DeviceInfo|null` |   |

### hasEventDeviceInfo

### clearEventDeviceInfo

### setEventDeviceInfo

Optional. Information gathered about the device being used (if any) when
the event happened.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.DeviceInfo` |

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

### getCartData

Optional. Information about the transaction and items associated with the
event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.CartData|null` |   |

### hasCartData

### clearCartData

### setCartData

Optional. Information about the transaction and items associated with the
event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.CartData` |

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

### getCustomVariables

Optional. Additional key/value pair information to send to the conversion
containers (conversion action or FL activity).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.CustomVariable>` |   |

### setCustomVariables

Optional. Additional key/value pair information to send to the conversion
containers (conversion action or FL activity).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.CustomVariable>` |

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

### getExperimentalFields

Optional. A list of key/value pairs for experimental fields that may
eventually be promoted to be part of the API.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ExperimentalField>` |   |

### setExperimentalFields

Optional. A list of key/value pairs for experimental fields that may
eventually be promoted to be part of the API.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ExperimentalField>` |

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

### getUserProperties

Optional. Advertiser-assessed information about the user at the time that
the event happened.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserProperties|null` |   |

### hasUserProperties

### clearUserProperties

### setUserProperties

Optional. Advertiser-assessed information about the user at the time that
the event happened.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserProperties` |

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

### getEventName

Optional. The name of the event. Required for GA4 events.

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

### setEventName

Optional. The name of the event. Required for GA4 events.

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

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

### getClientId

Optional. A unique identifier for the user instance of a web client for
this GA4 web stream.

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

### setClientId

Optional. A unique identifier for the user instance of a web client for
this GA4 web stream.

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

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

### getUserId

Optional. A unique identifier for a user, as defined by the advertiser.

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

### setUserId

Optional. A unique identifier for a user, as defined by the advertiser.

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

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

### getAdditionalEventParameters

Optional. A bucket of any [event
parameters](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events)
to be included within the event that were not already specified using other
structured fields.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventParameter>` |   |

### setAdditionalEventParameters

Optional. A bucket of any [event
parameters](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events)
to be included within the event that were not already specified using other
structured fields.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventParameter>` |

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

### getThirdPartyUserData

Optional. The same type of data provided in user_data, but explicitly
flagged as being provided as owned by a third-party and not first-party
advertiser data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserData|null` |   |

### hasThirdPartyUserData

### clearThirdPartyUserData

### setThirdPartyUserData

Optional. The same type of data provided in user_data, but explicitly
flagged as being provided as owned by a third-party and not first-party
advertiser data.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.UserData` |

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

### getEventLocation

Optional. Information gathered about the location of the user when this
event occurred.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventLocation|null` |   |

### hasEventLocation

### clearEventLocation

### setEventLocation

Optional. Information gathered about the location of the user when this
event occurred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.EventLocation` |

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

### getAppInstanceId

Optional. A unique identifier for the user instance of an app client for
this GA4 app stream.

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

### setAppInstanceId

Optional. A unique identifier for the user instance of an app client for
this GA4 app stream.

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

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