- HTTP request
- Request body
- Response body
- Authorization scopes
- Event
- AdIdentifiers
- DeviceInfo
- EventSource
- CartData
- Item
- CustomVariable
- ExperimentalField
- Try it!
Uploads a list of Event
resources from the provided Destination
.
HTTP request
POST https://datamanager.googleapis.com/v1/events:ingest
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "destinations": [ { object ( |
Fields | |
---|---|
destinations[] |
Required. The list of destinations to send the events to. |
events[] |
Required. The list of events to send to the specified destinations. At most 2000 |
consent |
Optional. Request-level consent to apply to all users in the request. User-level consent overrides request-level consent, and can be specified in each |
validateOnly |
Optional. For testing purposes. If |
encoding |
Optional. Required for |
encryptionInfo |
Optional. Encryption information for |
Response body
Response from the IngestEventsRequest
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "requestId": string } |
Fields | |
---|---|
requestId |
The auto-generated ID of the request. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/datamanager
Event
An event representing a user interaction with an advertiser's website or app.
JSON representation |
---|
{ "destinationReferences": [ string ], "transactionId": string, "eventTimestamp": string, "lastUpdatedTimestamp": string, "userData": { object ( |
Fields | |
---|---|
destinationReferences[] |
Optional. Reference string used to determine the destination. |
transactionId |
Required. The unique identifier for this event. |
eventTimestamp |
Required. The time the event occurred. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
lastUpdatedTimestamp |
Optional. The last time the event was updated. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
userData |
Optional. Pieces of user provided data, representing the user the event is associated with. |
consent |
Optional. Information about whether the associated user has provided different types of consent. |
adIdentifiers |
Optional. Identifiers and other information used to match the conversion event with other online activity (such as ad clicks). |
currency |
Optional. The currency code associated with all monetary values within this event. |
conversionValue |
Optional. The conversion value associated with the event, for value-based conversions. |
eventSource |
Optional. Signal for where the event happened (web, app, in-store, etc.). |
eventDeviceInfo |
Optional. Information gathered about the device being used (if any) when the event happened. |
cartData |
Optional. Information about the transaction and items associated with the event. |
customVariables[] |
Optional. Additional key/value pair information to send to the conversion containers (conversion action or FL activity). |
experimentalFields[] |
Optional. A list of key/value pairs for experimental fields that may eventually be promoted to be part of the API. |
AdIdentifiers
Identifiers and other information used to match the conversion event with other online activity (such as ad clicks).
JSON representation |
---|
{
"sessionAttributes": string,
"gclid": string,
"gbraid": string,
"wbraid": string,
"landingPageDeviceInfo": {
object ( |
Fields | |
---|---|
sessionAttributes |
Optional. Session attributes for event attribution and modeling. |
gclid |
Optional. The Google click ID (gclid) associated with this event. |
gbraid |
Optional. The click identifier for clicks associated with app events and originating from iOS devices starting with iOS14. |
wbraid |
Optional. The click identifier for clicks associated with web events and originating from iOS devices starting with iOS14. |
landingPageDeviceInfo |
Optional. Information gathered about the device being used (if any) at the time of landing onto the advertiser’s site after interacting with the ad. |
DeviceInfo
Information about the device being used (if any) when the event happened.
JSON representation |
---|
{ "userAgent": string, "ipAddress": string } |
Fields | |
---|---|
userAgent |
Optional. The user-agent string of the device for the given context. |
ipAddress |
Optional. The IP address of the device for the given context. |
EventSource
The source of the event.
Enums | |
---|---|
EVENT_SOURCE_UNSPECIFIED |
Unspecified EventSource. Should never be used. |
WEB |
The event was generated from a web browser. |
CartData
The cart data associated with the event.
JSON representation |
---|
{
"merchantId": string,
"merchantFeedLabel": string,
"merchantFeedLanguageCode": string,
"transactionDiscount": number,
"items": [
{
object ( |
Fields | |
---|---|
merchantId |
Optional. The Merchant Center ID associated with the items. |
merchantFeedLabel |
Optional. The Merchant Center feed label associated with the feed of the items. |
merchantFeedLanguageCode |
Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded. |
transactionDiscount |
Optional. The sum of all discounts associated with the transaction. |
items[] |
Optional. The list of items associated with the event. |
Item
Represents an item in the cart associated with the event.
JSON representation |
---|
{ "merchantProductId": string, "quantity": string, "unitPrice": number } |
Fields | |
---|---|
merchantProductId |
Optional. The product ID within the Merchant Center account. |
quantity |
Optional. The number of this item associated with the event. |
unitPrice |
Optional. The unit price excluding tax, shipping, and any transaction level discounts. |
CustomVariable
Custom variable for ads conversions.
JSON representation |
---|
{ "variable": string, "value": string } |
Fields | |
---|---|
variable |
Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored. |
value |
Optional. The value to store for the custom variable. |
ExperimentalField
Experimental field representing unofficial fields.
JSON representation |
---|
{ "field": string, "value": string } |
Fields | |
---|---|
field |
Optional. The name of the field to use. |
value |
Optional. The value the field to set. |