Reference documentation and code samples for the Google Ads Data Manager V1 Client class AdEvent.
An ad event.
Generated from protobuf message google.ads.datamanager.v1.AdEvent
Namespace
Google \ Ads \ DataManager \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ advertiser_id |
string
Required. The ID of the advertiser for the ad event. This must match the ID sent in the linking flow. |
↳ event_type |
int
Required. The type of the event. |
↳ event_subtype |
int
Enum value for event subtype. |
↳ event_subtype_string |
string
String value for event subtype. |
↳ timestamp |
Google\Protobuf\Timestamp
Required. The time the event occurred. |
↳ event_id |
string
Optional. An ID created and managed by the caller that uniquely identifies this event. Required if you want to deduplicate ad events that are included in multiple requests. Otherwise, this field is optional. |
↳ user_data |
UserData
Optional. Multiple pieces of user-provided data, representing the user the event is associated with. It is possible to provide multiple instances of the same type of data (e.g. email address). The more data provided, the more likely a match will be found. |
↳ device_info |
DeviceInfo
Optional. Information gathered about the device being used when the ad event happened. |
↳ mobile_device_id |
string
Optional. The device ID of the device that the ad was served to. |
↳ campaign_id |
string
Required. The ID of the associated campaign. |
↳ campaign_name |
string
Required. The name of the associated campaign. |
↳ ad_group_id |
string
Optional. The ID of the associated ad group. |
↳ ad_id |
string
Optional. The ID of the associated ad within the group. |
↳ ad_type |
int
Enum value for ad type. |
↳ ad_type_string |
string
String value for ad type. |
↳ ad_format |
int
Enum value for ad format. |
↳ ad_format_string |
string
String value for ad format. |
↳ ad_placement |
int
Enum value for ad placement. |
↳ ad_placement_string |
string
String value for ad placement. |
↳ ad_height |
int
Optional. The height of the ad in pixels. |
↳ ad_width |
int
Optional. The width of the ad in pixels. |
↳ region_code |
string
Required. The ISO 3166-2 country plus subdivision. |
↳ source |
string
Required. The platform source of the ad, akin to the Google Analytics source. |
↳ medium |
string
Required. The medium of the ad, akin to the Google Analytics medium. |
↳ targeting_type |
int
Enum value for targeting type. |
↳ targeting_type_string |
string
String value for targeting type. |
↳ platform_type |
int
Enum value for platform type. |
↳ platform_type_string |
string
String value for platform type. |
↳ platform |
int
Enum value for platform. |
↳ platform_string |
string
String value for platform. |
↳ attribution_hint |
int
Optional. The partner-assumed attribution status for this ad event. This acts only as a signal for how the partner assumed attribution played out, and does not force an end result in final reports. |
↳ viewability_info |
ViewabilityInfo
Required. Details of the viewability of the ad served. |
↳ measurement_allowed |
bool
Optional. Represents if the row is allowed to be used for measurement purposes, as governed by applicable privacy laws within regional jurisdiction. |
getAdvertiserId
Required. The ID of the advertiser for the ad event.
This must match the ID sent in the linking flow.
| Returns | |
|---|---|
| Type | Description |
string |
|
setAdvertiserId
Required. The ID of the advertiser for the ad event.
This must match the ID sent in the linking flow.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEventType
Required. The type of the event.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type EventType. |
setEventType
Required. The type of the event.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type EventType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEventSubtype
Enum value for event subtype.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type EventSubtype. |
hasEventSubtype
setEventSubtype
Enum value for event subtype.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type EventSubtype. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEventSubtypeString
String value for event subtype.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasEventSubtypeString
setEventSubtypeString
String value for event subtype.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTimestamp
Required. The time the event occurred.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasTimestamp
clearTimestamp
setTimestamp
Required. The time the event occurred.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEventId
Optional. An ID created and managed by the caller that uniquely identifies this event.
Required if you want to deduplicate ad events that are included in multiple requests. Otherwise, this field is optional.
| Returns | |
|---|---|
| Type | Description |
string |
|
setEventId
Optional. An ID created and managed by the caller that uniquely identifies this event.
Required if you want to deduplicate ad events that are included in multiple requests. Otherwise, this field is optional.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUserData
Optional. Multiple pieces of user-provided data, representing the user the event is associated with.
It is possible to provide multiple instances of the same type of data (e.g. email address). The more data provided, the more likely a match will be found.
| Returns | |
|---|---|
| Type | Description |
UserData|null |
|
hasUserData
clearUserData
setUserData
Optional. Multiple pieces of user-provided data, representing the user the event is associated with.
It is possible to provide multiple instances of the same type of data (e.g. email address). The more data provided, the more likely a match will be found.
| Parameter | |
|---|---|
| Name | Description |
var |
UserData
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDeviceInfo
Optional. Information gathered about the device being used when the ad event happened.
| Returns | |
|---|---|
| Type | Description |
DeviceInfo|null |
|
hasDeviceInfo
clearDeviceInfo
setDeviceInfo
Optional. Information gathered about the device being used when the ad event happened.
| Parameter | |
|---|---|
| Name | Description |
var |
DeviceInfo
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMobileDeviceId
Optional. The device ID of the device that the ad was served to.
| Returns | |
|---|---|
| Type | Description |
string |
|
setMobileDeviceId
Optional. The device ID of the device that the ad was served to.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCampaignId
Required. The ID of the associated campaign.
| Returns | |
|---|---|
| Type | Description |
string |
|
setCampaignId
Required. The ID of the associated campaign.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCampaignName
Required. The name of the associated campaign.
| Returns | |
|---|---|
| Type | Description |
string |
|
setCampaignName
Required. The name of the associated campaign.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdGroupId
Optional. The ID of the associated ad group.
| Returns | |
|---|---|
| Type | Description |
string |
|
setAdGroupId
Optional. The ID of the associated ad group.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdId
Optional. The ID of the associated ad within the group.
| Returns | |
|---|---|
| Type | Description |
string |
|
setAdId
Optional. The ID of the associated ad within the group.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdType
Enum value for ad type.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type AdType. |
hasAdType
setAdType
Enum value for ad type.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type AdType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdTypeString
String value for ad type.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasAdTypeString
setAdTypeString
String value for ad type.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdFormat
Enum value for ad format.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type AdFormat. |
hasAdFormat
setAdFormat
Enum value for ad format.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type AdFormat. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdFormatString
String value for ad format.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasAdFormatString
setAdFormatString
String value for ad format.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdPlacement
Enum value for ad placement.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type AdPlacement. |
hasAdPlacement
setAdPlacement
Enum value for ad placement.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type AdPlacement. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdPlacementString
String value for ad placement.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasAdPlacementString
setAdPlacementString
String value for ad placement.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdHeight
Optional. The height of the ad in pixels.
| Returns | |
|---|---|
| Type | Description |
int |
|
setAdHeight
Optional. The height of the ad in pixels.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdWidth
Optional. The width of the ad in pixels.
| Returns | |
|---|---|
| Type | Description |
int |
|
setAdWidth
Optional. The width of the ad in pixels.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRegionCode
Required. The ISO 3166-2 country plus subdivision.
| Returns | |
|---|---|
| Type | Description |
string |
|
setRegionCode
Required. The ISO 3166-2 country plus subdivision.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSource
Required. The platform source of the ad, akin to the Google Analytics source.
| Returns | |
|---|---|
| Type | Description |
string |
|
setSource
Required. The platform source of the ad, akin to the Google Analytics source.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMedium
Required. The medium of the ad, akin to the Google Analytics medium.
| Returns | |
|---|---|
| Type | Description |
string |
|
setMedium
Required. The medium of the ad, akin to the Google Analytics medium.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTargetingType
Enum value for targeting type.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type TargetingType. |
hasTargetingType
setTargetingType
Enum value for targeting type.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type TargetingType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTargetingTypeString
String value for targeting type.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasTargetingTypeString
setTargetingTypeString
String value for targeting type.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPlatformType
Enum value for platform type.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type PlatformType. |
hasPlatformType
setPlatformType
Enum value for platform type.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type PlatformType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPlatformTypeString
String value for platform type.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasPlatformTypeString
setPlatformTypeString
String value for platform type.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPlatform
Enum value for platform.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type Platform. |
hasPlatform
setPlatform
Enum value for platform.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type Platform. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPlatformString
String value for platform.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasPlatformString
setPlatformString
String value for platform.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAttributionHint
Optional. The partner-assumed attribution status for this ad event.
This acts only as a signal for how the partner assumed attribution played out, and does not force an end result in final reports.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type AttributionHint. |
setAttributionHint
Optional. The partner-assumed attribution status for this ad event.
This acts only as a signal for how the partner assumed attribution played out, and does not force an end result in final reports.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type AttributionHint. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getViewabilityInfo
Required. Details of the viewability of the ad served.
| Returns | |
|---|---|
| Type | Description |
ViewabilityInfo|null |
|
hasViewabilityInfo
clearViewabilityInfo
setViewabilityInfo
Required. Details of the viewability of the ad served.
| Parameter | |
|---|---|
| Name | Description |
var |
ViewabilityInfo
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMeasurementAllowed
Optional. Represents if the row is allowed to be used for measurement purposes, as governed by applicable privacy laws within regional jurisdiction.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasMeasurementAllowed
clearMeasurementAllowed
setMeasurementAllowed
Optional. Represents if the row is allowed to be used for measurement purposes, as governed by applicable privacy laws within regional jurisdiction.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEventSubtypeOneof
| Returns | |
|---|---|
| Type | Description |
string |
|
getAdTypeOneof
| Returns | |
|---|---|
| Type | Description |
string |
|
getAdFormatOneof
| Returns | |
|---|---|
| Type | Description |
string |
|
getAdPlacementOneof
| Returns | |
|---|---|
| Type | Description |
string |
|
getTargetingTypeOneof
| Returns | |
|---|---|
| Type | Description |
string |
|
getPlatformTypeOneof
| Returns | |
|---|---|
| Type | Description |
string |
|
getPlatformOneof
| Returns | |
|---|---|
| Type | Description |
string |
|