---
title: "POST /v1/adEvents:ingest"
method: POST
path: "/v1/adEvents:ingest"
tags: ["adEvents"]
---

# POST /v1/adEvents:ingest

`POST /v1/adEvents:ingest`

Uploads a list of AdEvent resources to Google Analytics. This feature is only available to accounts on an allowlist.

## Request body

- IngestAdEventsRequest — Request to upload ad events.
  - `encryptionInfo` EncryptionInfo — Encryption information for the data being ingested.
    - `coordinatorKeyInfo` CoordinatorKeyInfo — Information about the coordinator key.
      - `keyId` string — Required. The ID of the chosen coordinator key.
    - `gcpWrappedKeyInfo` GcpWrappedKeyInfo — Information about the Google Cloud Platform wrapped key.
      - `keyType` 'KEY_TYPE_UNSPECIFIED' | 'XCHACHA20_POLY1305' — Required. The type of algorithm used to encrypt the data.
      - `wipProvider` string — Required. The [Workload Identity](//cloud.google.com/iam/docs/workload-identity-federation) pool provider required to use KEK.
      - `kekUri` string — Required. Google Cloud Platform [Cloud Key Management Service resource ID](//cloud.google.com/kms/docs/getting-resource-ids). Should be in the format of `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}` or `gcp-kms://projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}`
      - `encryptedDek` string — Required. The base64 encoded encrypted data encryption key.
    - `awsWrappedKeyInfo` AwsWrappedKeyInfo — A data encryption key wrapped by an AWS KMS key.
      - `kekUri` string — Required. The URI of the AWS KMS key used to decrypt the DEK. Should be in the format of `arn:{partition}:kms:{region}:{account_id}:key/{key_id}` or `aws-kms://arn:{partition}:kms:{region}:{account_id}:key/{key_id}`
      - `encryptedDek` string — Required. The base64 encoded encrypted data encryption key.
      - `roleArn` string — Required. The Amazon Resource Name of the IAM Role to assume for KMS decryption access. Should be in the format of `arn:{partition}:iam::{account_id}:role/{role_name}`
      - `keyType` 'KEY_TYPE_UNSPECIFIED' | 'XCHACHA20_POLY1305' — Required. The type of algorithm used to encrypt the data.
  - `validateOnly` boolean — Optional. If true, the request is validated, but not executed.
  - `adEvents` AdEvent[] — Required. Required (at least 1). A list of ad events.
    - `platform` 'PLATFORM_UNSPECIFIED' | 'PLATFORM_IOS' | 'PLATFORM_ANDROID' | 'PLATFORM_WEB' — Enum value for platform.
    - `campaignId` string — Required. The ID of the associated campaign.
    - `platformString` string — String value for platform.
    - `source` string — Required. The platform source of the ad, akin to the Google Analytics source.
    - `mobileDeviceId` string — Optional. The device ID of the device that the ad was served to.
    - `eventType` 'EVENT_TYPE_UNSPECIFIED' | 'EVENT_TYPE_VIEW' | 'EVENT_TYPE_CLICK' — Required. The type of the event.
    - `adTypeString` string — String value for ad type.
    - `adFormat` 'AD_FORMAT_UNSPECIFIED' | 'AD_FORMAT_AR' | 'AD_FORMAT_AUDIO' | 'AD_FORMAT_BANNER' | 'AD_FORMAT_BUMPER' | 'AD_FORMAT_CAROUSEL' | 'AD_FORMAT_COLLECTION' | 'AD_FORMAT_IMAGE' | 'AD_FORMAT_INTERACTIVE' | 'AD_FORMAT_INTERSTITIAL' | 'AD_FORMAT_IN_FEED' | 'AD_FORMAT_IN_STREAM' | 'AD_FORMAT_IN_STREAM_SKIPPABLE' | 'AD_FORMAT_IN_STREAM_NON_SKIPPABLE' | 'AD_FORMAT_NATIVE' | 'AD_FORMAT_SHORTS' | 'AD_FORMAT_STORY' | 'AD_FORMAT_SPONSORED' | 'AD_FORMAT_VIDEO' — Enum value for ad format.
    - `viewabilityInfo` ViewabilityInfo — Details of the viewability of the ad served.
      - `mediaSkippable` boolean — Optional. Whether the ad media was skippable or not.
      - `viewType` 'VIEW_TYPE_UNSPECIFIED' | 'VIEW_TYPE_MRC_VIEWED' | 'VIEW_TYPE_MRC_RENDERED' — Required. The type of the event.
      - `viewablePercent` integer — Optional. The numerical percent (0-100) of the pixels that were viewable.
      - `viewableDuration` string, google-duration — Optional. The amount of time the ad was viewable for.
      - `mediaVolumePercent` integer — Optional. The numerical percent (0-100) of the volume of the media playback.
      - `mediaQuartile` 'MEDIA_QUARTILE_UNSPECIFIED' | 'MEDIA_QUARTILE_START' | 'MEDIA_QUARTILE_FIRST_QUARTILE' | 'MEDIA_QUARTILE_MIDPOINT' | 'MEDIA_QUARTILE_THIRD_QUARTILE' | 'MEDIA_QUARTILE_COMPLETE' — Optional. The amount of the media that was played as discrete quartiles.
      - `mediaDuration` string, google-duration — Optional. The duration of the ad media.
      - `playbackDuration` string, google-duration — Optional. The duration of playback of the ad media, regardless of whether it was viewable or not.
    - `userData` UserData — Data that identifies the user. At least one identifier is required.
      - `userIdentifiers` UserIdentifier[] — Required. The identifiers for the user. It's possible to provide multiple instances of the same type of data (for example, multiple email addresses). To increase the likelihood of a match, provide as many identifiers as possible. At most 10 `userIdentifiers` can be provided in a single AudienceMember or Event.
        - `emailAddress` string — Hashed email address using SHA-256 hash function after normalization.
        - `address` AddressInfo — Address information for the user.
          - `givenName` string — Required. Given (first) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256.
          - `postalCode` string — Required. The postal code of the user's address.
          - `regionCode` string — Required. The 2-letter region code in ISO-3166-1 alpha-2 of the user's address.
          - `familyName` string — Required. Family (last) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256.
        - `phoneNumber` string — Hashed phone number using SHA-256 hash function after normalization (E164 standard).
    - `targetingTypeString` string — String value for targeting type.
    - `measurementAllowed` boolean — Optional. Represents if the row is allowed to be used for measurement purposes, as governed by applicable privacy laws within regional jurisdiction.
    - `adWidth` integer — Optional. The width of the ad in pixels.
    - `attributionHint` 'ATTRIBUTION_HINT_UNSPECIFIED' | 'ATTRIBUTION_HINT_CONVERTED' | 'ATTRIBUTION_HINT_NOT_CONVERTED' — 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.
    - `eventSubtypeString` string — String value for event subtype.
    - `platformType` 'PLATFORM_TYPE_UNSPECIFIED' | 'PLATFORM_TYPE_MOBILE' | 'PLATFORM_TYPE_DESKTOP' | 'PLATFORM_TYPE_CTV' | 'PLATFORM_TYPE_PHONE' | 'PLATFORM_TYPE_TABLET' — Enum value for platform type.
    - `eventSubtype` 'EVENT_SUBTYPE_UNSPECIFIED' | 'EVENT_SUBTYPE_IMPRESSION' | 'EVENT_SUBTYPE_ENGAGED_VIEW' | 'EVENT_SUBTYPE_ONSITE_CLICK' | 'EVENT_SUBTYPE_OUTBOUND_CLICK' — Enum value for event subtype.
    - `advertiserId` string — Required. The ID of the advertiser for the ad event. This must match the ID sent in the linking flow.
    - `timestamp` string, google-datetime — Required. The time the event occurred.
    - `adPlacementString` string — String value for ad placement.
    - `campaignName` string — Required. The name of the associated campaign.
    - `adId` string — Optional. The ID of the associated ad within the group.
    - `eventId` 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.
    - `platformTypeString` string — String value for platform type.
    - `targetingType` 'TARGETING_TYPE_UNSPECIFIED' | 'TARGETING_TYPE_AUDIENCE' | 'TARGETING_TYPE_CONTEXTUAL' | 'TARGETING_TYPE_DEMOGRAPHIC' | 'TARGETING_TYPE_DEVICE' | 'TARGETING_TYPE_GEO' | 'TARGETING_TYPE_INTEREST' | 'TARGETING_TYPE_PURCHASE_INTENT' | 'TARGETING_TYPE_REMARKETING' — Enum value for targeting type.
    - `adHeight` integer — Optional. The height of the ad in pixels.
    - `medium` string — Required. The medium of the ad, akin to the Google Analytics medium.
    - `deviceInfo` DeviceInfo — Information about the device being used (if any) when the event happened.
      - `model` string — Optional. The model of the device.
      - `browserVersion` string — Optional. The version of the browser.
      - `operatingSystem` string — Optional. The operating system or platform of the device.
      - `operatingSystemVersion` string — Optional. The version of the operating system or platform.
      - `userAgent` string — Optional. The user-agent string of the device for the given context.
      - `ipAddress` string — Optional. The IP address of the device for the given context. **Note:** Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the [About offline conversion imports](https://support.google.com/google-ads/answer/2998031) page for more details.
      - `languageCode` string — Optional. The language the device uses in ISO 639-1 format.
      - `screenHeight` integer — Optional. The height of the screen in pixels.
      - `screenWidth` integer — Optional. The width of the screen in pixels.
      - `browser` string — Optional. The brand or type of the browser.
      - `brand` string — Optional. The brand of the device.
      - `category` string — Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.
    - `adPlacement` 'AD_PLACEMENT_UNSPECIFIED' | 'AD_PLACEMENT_DISCOVER' | 'AD_PLACEMENT_FEED' | 'AD_PLACEMENT_FOOTER' | 'AD_PLACEMENT_HEADER' | 'AD_PLACEMENT_HOME' | 'AD_PLACEMENT_IN_CONTENT' | 'AD_PLACEMENT_PROMOTED' | 'AD_PLACEMENT_SEARCH' | 'AD_PLACEMENT_STORY' — Enum value for ad placement.
    - `adType` 'AD_TYPE_UNSPECIFIED' | 'AD_TYPE_DISPLAY' | 'AD_TYPE_TEXT' | 'AD_TYPE_IMAGE' | 'AD_TYPE_RICH_MEDIA' | 'AD_TYPE_HTML' | 'AD_TYPE_AUDIO' | 'AD_TYPE_VIDEO' — Enum value for ad type.
    - `regionCode` string — Required. The ISO 3166-2 country plus subdivision.
    - `adFormatString` string — String value for ad format.
    - `adGroupId` string — Optional. The ID of the associated ad group.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/datamanager.md) · [All operations](https://skmtc.dev/google/apis/datamanager/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/datamanager/revisions/a26378ca9ba8/schema)
