Google Ads Data Manager V1 Client - Class Event (0.1.0)

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 array

Optional. Reference string used to determine the destination. If empty, the event will be sent to all destinations in the request.

↳ transaction_id string

Optional. The unique identifier for this event. Required for conversions using multiple data sources.

↳ event_timestamp Google\Protobuf\Timestamp

Required. The time the event occurred.

↳ last_updated_timestamp Google\Protobuf\Timestamp

Optional. The last time the event was updated.

↳ user_data UserData

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

↳ consent Consent

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

↳ ad_identifiers 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.

↳ event_source int

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

↳ event_device_info DeviceInfo

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

↳ cart_data CartData

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

↳ custom_variables array<CustomVariable>

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

↳ experimental_fields array<ExperimentalField>

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

↳ user_properties 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<EventParameter>

Optional. A bucket of any event parameters to be included within the event that were not already specified using other structured fields.

getDestinationReferences

Optional. Reference string used to determine the destination. If empty, the event will be sent to all destinations in the request.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setDestinationReferences

Optional. Reference string used to determine the destination. If empty, the event will be sent to all destinations in the request.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getTransactionId

Optional. The unique identifier for this event. Required for conversions using multiple data sources.

Returns
Type Description
string

setTransactionId

Optional. The unique identifier for this event. Required for conversions using multiple data sources.

Parameter
Name Description
var string
Returns
Type Description
$this

getEventTimestamp

Required. The time the event occurred.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasEventTimestamp

clearEventTimestamp

setEventTimestamp

Required. The time the event occurred.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getLastUpdatedTimestamp

Optional. The last time the event was updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasLastUpdatedTimestamp

clearLastUpdatedTimestamp

setLastUpdatedTimestamp

Optional. The last time the event was updated.

Parameter
Name Description
var 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
UserData|null

hasUserData

clearUserData

setUserData

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

Parameter
Name Description
var UserData
Returns
Type Description
$this

getConsent

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

Returns
Type Description
Consent|null

hasConsent

clearConsent

setConsent

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

Parameter
Name Description
var 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
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 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

setConversionValue

Optional. The conversion value associated with the event, for value-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.

setEventSource

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

Parameter
Name Description
var int

Enum of type EventSource.

Returns
Type Description
$this

getEventDeviceInfo

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

Returns
Type Description
DeviceInfo|null

hasEventDeviceInfo

clearEventDeviceInfo

setEventDeviceInfo

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

Parameter
Name Description
var DeviceInfo
Returns
Type Description
$this

getCartData

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

Returns
Type Description
CartData|null

hasCartData

clearCartData

setCartData

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

Parameter
Name Description
var 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
Google\Protobuf\Internal\RepeatedField

setCustomVariables

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

Parameter
Name Description
var array<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
Google\Protobuf\Internal\RepeatedField

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<ExperimentalField>
Returns
Type Description
$this

getUserProperties

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

Returns
Type Description
UserProperties|null

hasUserProperties

clearUserProperties

setUserProperties

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

Parameter
Name Description
var 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 to be included within the event that were not already specified using other structured fields.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAdditionalEventParameters

Optional. A bucket of any event parameters to be included within the event that were not already specified using other structured fields.

Parameter
Name Description
var array<EventParameter>
Returns
Type Description
$this