Use the mappings in the tables to map an
[`conversions.batchinsert`](https://developers.google.com/doubleclick-advertisers/rest/v5/conversions/batchinsert) in the Campaign Manager 360 API to its
[`IngestEventsRequest`](https://developers.google.com/data-manager/api/reference/rpc/google.ads.datamanager.v1#ingesteventsrequest) equivalent in the Data Manager API.

## Authentication


The Data Manager API requires credentials with a different scope than the
Campaign Manager 360 API. Follow the steps in
[Set up API access](https://developers.google.com/data-manager/api/devguides/quickstart/set-up-access) to generate new
credentials that include the Data Manager API scope.

## Request fields

| [`conversions.batchinsert`](https://developers.google.com/doubleclick-advertisers/rest/v5/conversions/batchinsert) (Campaign Manager 360 API) | [`IngestEventsRequest`](https://developers.google.com/data-manager/api/reference/rpc/google.ads.datamanager.v1#ingesteventsrequest) (Data Manager API) | Notes |
|---|---|---|
| `profileId` URL path parameter | No equivalent |   |
| `kind` | No equivalent | Metadata field; not used by the Data Manager API. |
| `conversions` | `events` | **Required.** The list of conversions or events. See the [Conversion fields section](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade/field-mappings#conversion) for details. |
| `encryptionInfo` | Moved to `events.adIdentifiers.encryptedUserIds` | **Defined at the event level.** Campaign Manager 360 encryption information is now specified in each encrypted user ID. See the [Conversion fields section](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade/field-mappings#conversion). |
| No equivalent | `encryptionInfo` | The request-level `encryptionInfo` is the encryption information for encrypted [`UserData`](https://developers.google.com/data-manager/api/reference/rest/v1/UserData) user identifiers. See [Encryption](https://developers.google.com/data-manager/api/devguides/concepts/encryption) for details. |
| No equivalent | `destinations` | **Required.** A list of [`Destination`](https://developers.google.com/data-manager/api/reference/rest/v1/Destination) objects that define the target account and Floodlight activity for the events. See the [Destinations guide](https://developers.google.com/data-manager/api/devguides/concepts/destinations) for details. Map individual fields as shown in the [Conversion fields section](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade/field-mappings#conversion). |
| No equivalent | `consent` | Optional default consent settings for events in the request. You can override this value for an individual event by setting the `consent` field of `Event`. |
| No equivalent | `encoding` | **Required if sending user identifiers:** Set to the [`Encoding`](https://developers.google.com/data-manager/api/reference/rest/v1/Encoding) used for `UserIdentifier` values. If not using user identifiers, this field is ignored. |
| No equivalent | `validateOnly` | If true, the request is validated, but not executed. |

## Conversion fields

| [`Conversion`](https://developers.google.com/doubleclick-advertisers/rest/v5/Conversion) (Campaign Manager 360 API) | [`Event`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#event) (Data Manager API) | Notes |
|---|---|---|
| `floodlightConfigurationId` | `destinations[].operatingAccount.accountId` | **Defined at the request level.** Set to the Floodlight configuration ID. |
| No equivalent | `destinations[].operatingAccount.accountType` | **Defined at the request level.** Set to `FLOODLIGHT_CONFIG`. |
| `floodlightActivityId` | `destinations[].productDestinationId` | **Defined at the request level.** Set to the Floodlight activity ID. |
| `kind` | No equivalent | Metadata field; not used by the Data Manager API. |
| No equivalent | `destinations[].reference` | **Defined at the request level.** A user-defined identifier for the destination. Set this field if you are [sending events to multiple destinations in a single request](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/send-events#multiple-destinations). |
| `adUserDataConsent` | `consent.adUserData` | See [`Consent`](https://developers.google.com/data-manager/api/reference/rest/v1/Consent) for more details. |
| `nonPersonalizedAd` | `consent.adPersonalization` | See [`Consent`](https://developers.google.com/data-manager/api/reference/rest/v1/Consent) for more details. |
| No equivalent | `destinationReferences` | If [sending events to multiple destinations in a single request](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/send-events#multiple-destinations), set this field to the corresponding `reference` of the [destination](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade/field-mappings#request). |
| `timestampMicros` | `eventTimestamp` | - If using the JSON format, set to a value in [RFC 3339](https://www.ietf.org/rfc/rfc3339) format, which differs slightly from the Campaign Manager 360 API, which expected `timestampMicros` in microseconds since the Unix epoch. - If using protocol buffers, use a [`Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) and set the `seconds` and (optionally) the `nanoseconds` fields. <br /> See [Timestamp format](https://developers.google.com/data-manager/api/devguides/concepts/formatting#timestamp_format) for details. |
| `value` | `conversionValue` |   |
| `quantity` | `conversionCount` |   |
| `ordinal` | No equivalent | The `ordinal` field from the Campaign Manager 360 API is not present in the Data Manager API. Instead, Data Manager API uses `transactionId` to deduplicate events sent to the same Floodlight activity ID. <br /> In Campaign Manager 360 API, you could ensure events would be deduplicated by setting `ordinal` to a fixed, constant value such as `1`. In Data Manager API, `transactionId` must be set to a unique identifier for each event. |
| No equivalent | `transactionId` | The Data Manager API uses a combination of Floodlight activity ID and `transactionId` to deduplicate the event. The `transactionId` field must be set to a unique identifier for each event. <br /> **Required** if sending events for multi-source conversions. See [Convert the data to `Event` objects](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/send-events#convert_to_events) for more details. |
| `customVariables` | `customVariables` | A list of [`CustomVariable`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#customvariable) objects. The Data Manager API uses strings as keys instead of enums. Use keys like `U1`, `U2` for the `variable` field. |
| `limitAdTracking` | `consent.adPersonalization` | See [`Consent`](https://developers.google.com/data-manager/api/reference/rest/v1/Consent) for more details. |
| `childDirectedTreatment` | `consent.adPersonalization` | See [`Consent`](https://developers.google.com/data-manager/api/reference/rest/v1/Consent) for more details. |
| `treatmentForUnderage` | `consent.adPersonalization` | See [`Consent`](https://developers.google.com/data-manager/api/reference/rest/v1/Consent) for more details. |
| `gclid` | `adIdentifiers.gclid` | See [`AdIdentifiers`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#adidentifiers) for more details. |
| `dclid` | `adIdentifiers.dclid` | See [`AdIdentifiers`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#adidentifiers) for more details. |
| `matchId` | `adIdentifiers.matchId` | See [`AdIdentifiers`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#adidentifiers) for more details. |
| `mobileDeviceId` | `adIdentifiers.mobileId` | See [`AdIdentifiers`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#adidentifiers) for more details. |
| `impressionId` | `adIdentifiers.impressionId` | See [`AdIdentifiers`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#adidentifiers) for more details. |
| `encryptedUserId` | `adIdentifiers.encryptedUserIds` | The Data Manager API supports multiple encrypted user IDs. See [`AdIdentifiers`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#adidentifiers) for more details. |
| `encryptedUserIdCandidates` | `adIdentifiers.encryptedUserIds` | Each candidate ID maps to an [`EncryptedUserId`](https://developers.google.com/data-manager/api/reference/rest/v1/EncryptionInfo) object in the list. |
| `encryptionInfo.kind` | No equivalent | Metadata field; not used by the Data Manager API. |
| `encryptionInfo.encryptionEntityType` | `adIdentifiers.encryptedUserIds[].entityType` | Instead of specifying the encryption info once per request, it is specified per encrypted user ID. |
| `encryptionInfo.encryptionEntityId` | `adIdentifiers.encryptedUserIds[].entityId` | Instead of specifying the encryption info once per request, it is specified per encrypted user ID. |
| `encryptionInfo.encryptionSource` | `adIdentifiers.encryptedUserIds[].source` | Instead of specifying the encryption info once per request, it is specified per encrypted user ID. |
| `sessionAttributesEncoded` | `adIdentifiers.sessionAttributes` | See [`AdIdentifiers`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#adidentifiers) for more details. |
| `cartData` | `cartData` | See [Cart data fields](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade/field-mappings#cart-data) for details. |
| `userIdentifiers` | `userData.userIdentifiers` | See [User identifier fields](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade/field-mappings#user-identifiers) for details. |

## User identifier fields

In the Data Manager API, user identifiers are grouped within a
[`UserData`](https://developers.google.com/data-manager/api/reference/rest/v1/UserData) object under the `userData` field of the
`Event`. This differs from the Campaign Manager 360 API, where identifiers are directly
attached to the `Conversion` object.

| [`UserIdentifier`](https://developers.google.com/doubleclick-advertisers/rest/v5/Conversion#UserIdentifier) (Campaign Manager 360 API) | [`UserIdentifier`](https://developers.google.com/data-manager/api/reference/rest/v1/UserData#useridentifier) (Data Manager API) | Notes |
|---|---|---|
| `hashedEmail` | `emailAddress` | Set to the [formatted and hashed](https://developers.google.com/data-manager/api/devguides/concepts/formatting) email address. You can also [encrypt the hashed email address](https://developers.google.com/data-manager/api/devguides/concepts/encryption). |
| `hashedPhoneNumber` | `phoneNumber` | Set to the [formatted and hashed](https://developers.google.com/data-manager/api/devguides/concepts/formatting) phone number. You can also [encrypt the hashed phone number](https://developers.google.com/data-manager/api/devguides/concepts/encryption). |
| `addressInfo` | `address` | Set to an [`AddressInfo`](https://developers.google.com/data-manager/api/reference/rest/v1/UserData#addressinfo) object. Follow the [formatting and hashing guidelines](https://developers.google.com/data-manager/api/devguides/concepts/formatting). You can also [encrypt the hashed attributes of an address](https://developers.google.com/data-manager/api/devguides/concepts/encryption). |
| `addressInfo.hashedFirstName` | `address.givenName` |   |
| `addressInfo.hashedLastName` | `address.familyName` |   |
| `addressInfo.countryCode` | `address.regionCode` |   |
| `addressInfo.postalCode` | `address.postalCode` |   |
| `addressInfo.city` | No equivalent | Not supported for Campaign Manager 360 destinations. |
| `addressInfo.state` | No equivalent | Not supported for Campaign Manager 360 destinations. |
| `addressInfo.hashedStreetAddress` | No equivalent | Not supported for Campaign Manager 360 destinations. |

## Cart data fields

| [`CartData`](https://developers.google.com/doubleclick-advertisers/rest/v5/Conversion#CartData) (Campaign Manager 360 API) | [`CartData`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#cartdata) (Data Manager API) | Notes |
|---|---|---|
| `kind` | No equivalent | Metadata field; not used by the Data Manager API. |
| `merchantId` | `merchantId` |   |
| `merchantFeedLabel` | `merchantFeedLabel` |   |
| `merchantFeedLanguage` | `merchantFeedLanguageCode` |   |
| `items` | `items` | A list of [`Item`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#item) objects. See [Item fields](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade/field-mappings#items) for more details.. |

## Item fields for cart data

| [`Item`](https://developers.google.com/doubleclick-advertisers/rest/v5/Conversion#Item) (Campaign Manager 360 API) | [`Item`](https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest#item) (Data Manager API) | Notes |
|---|---|---|
| `kind` | No equivalent | Metadata field; not used by the Data Manager API. |
| No equivalent | `itemId` | Optional. A unique identifier for the item. |
| `itemId` | `merchantProductId` | **Required.** Set to the [Merchant Center product ID](https://support.google.com/merchants/answer/6324405) for the item. |
| `quantity` | `quantity` | **Required.** |
| `unitPrice` | `unitPrice` | **Required.** |