> [!IMPORTANT]
> **Important:** [Upgrade your offline conversions workflows to the Data Manager
> API](https://developers.google.com/data-manager/api/devguides/events/cm360/offline/upgrade) for an improved developer experience and access to additional features. We don't recommend implementing new offline conversion workflows using the Campaign Manager 360 API.

In Campaign Manager 360 a conversion is recorded by a tag, known as a [Floodlight
activity](https://support.google.com/dcm/answer/2823400), when a user performs a predefined action
after being served an ad. Commonly tagged actions include tracking when a user
purchases an item from an online store, or visits a webpage to request more
information through an online form. In general, conversions tracked by Google
both begin and end online.

Conversions for some advertisers, however, may start online and finish offline.
An example of this is a user that begins researching a product online, clicks on
an ad, and then completes their purchase over the phone or in a retail store. In
this scenario, Campaign Manager 360 will have data about the online portion of the
transaction, but not the offline portion, resulting in the conversion going
unrecorded.

To address this, the Campaign Manager 360 API's [`Conversions`](https://developers.google.com/doubleclick-advertisers/current/conversions) service lets
advertisers provide information about the offline portion of these conversions
directly to Campaign Manager 360.

## Prerequisites

Before you can start working with the `Conversions` service, you'll need to
complete the following steps:

1. Create and authorize an API project as outlined in our [Get
   Started](https://developers.google.com/doubleclick-advertisers/getting_started) guide.

2. Ensure your Campaign Manager 360 user profile has the necessary user role
   permissions. Contact your Campaign Manager 360 account administrator to have
   these permissions enabled, if necessary.

   - **Insert offline conversions** : Permits uploading new offline
     conversions using [`batchinsert`](https://developers.google.com/doubleclick-advertisers/current/conversions/batchinsert).

   - **Update offline conversions** : Permits modifying existing
     offline conversions using [`batchupdate`](https://developers.google.com/doubleclick-advertisers/current/conversions/batchupdate).

## Match conversions to activities

Offline conversions must be matched to a corresponding online activity in
Campaign Manager 360. You'll refer to these activities by their
`floodlightActivityId` and corresponding `floodlightConfigurationId`.

If you don't yet have an activity for tracking offline conversions, you can use
the API's [`FloodlightActivities`](https://developers.google.com/doubleclick-advertisers/current/floodlightActivities) service to
create one. See the [Common Trafficking Tasks](https://developers.google.com/doubleclick-advertisers/trafficking_tasks#floodlighttag) guide for an
example of how to do this. Creating dedicated activities for offline conversions
is highly recommended.

## Obtain click, device, and user IDs

Offline conversions must also be attributed to a click, device, or user ID (only
one of which can be used at a time). The most common ways to obtain these IDs
are covered below.

### Using Display Click ID

Conversions can be attributed to ad clicks through the use of Display Click IDs
(DCLIDs). DCLIDs can be obtained from [Enhanced Attribution](https://support.google.com/campaignmanager/answer/9182069).

> [!IMPORTANT]
> **Important:** Offline conversions can not be attributed to the specific click identified by a DCLID. Instead, each conversion will be associated with the user responsible for the click. If a more recent click was recorded from the same user, for example, the conversion can be attributed to that click instead.

Display Click IDs must be passed in the [`dclid`](https://developers.google.com/doubleclick-advertisers/current/conversions#dclid)
field.

### Using Google Click ID

Conversions can be attributed to ad clicks through the use of Google Click IDs
(GCLIDs). GCLIDs can be obtained from [Google Ads](https://support.google.com/adwords/answer/3095550) or [Search Ads
360](https://support.google.com/ds/answer/7342044).

> [!IMPORTANT]
> **Important:** Offline conversions can not be attributed to the specific click identified by a GCLID. Instead, each conversion will be associated with the user responsible for the click. If a more recent click was recorded from the same user, for example, the conversion can be attributed to that click instead.

Google Click IDs must be passed in the [`gclid`](https://developers.google.com/doubleclick-advertisers/current/conversions#gclid)
field.

### Using match ID

Conversions can be attributed through your own first-party identifier that has
been synced with Google using the [`match_id`](https://support.google.com/campaignmanager/answer/7554821#custom) feature in
Floodlight.

### Using mobile device ID

Conversions can be directly attributed to mobile or Connected TV devices through
the use of advertising device identifiers. The following identifiers are
supported:

- [AdID](https://developer.android.com/google/play-services/id.html)
- IDFA
- Identifiers for Advertising from CTV devices:
  - RIDA (Roku)
  - AFAI (Fire TV)
  - AdID (Android TV)
  - IDFA (Apple TV)
  - MSAI (Xbox)
  - TIFA (Samsung)
  - VIDA (Vizio)

These identifiers must be passed in the
[`mobileDeviceId`](https://developers.google.com/doubleclick-advertisers/current/conversions#mobileDeviceId) field.

### Using the %m match macro

> [!WARNING]
> **Warning:** As of May 25, 2018, encrypted user IDs won't be populated in the %m macro for users in the European Economic Area. [Learn more](https://support.google.com/dcm/answer/9006418)

The [%m macro](https://support.google.com/dcm/table/6096962#match) can be inserted into click-through or redirect
URLs for a creative. The ad server will expand this macro into a user's
[encrypted user ID](https://support.google.com/dcm/answer/6206106) following a click event. The encrypted user
ID can then be captured directly from the redirect URL, or from server logs.

IDs captured using the %m macro must be passed in the
[`encryptedUserId`](https://developers.google.com/doubleclick-advertisers/current/conversions#encryptedUserId) or
[`encryptedUserIdCandidates[]`](https://developers.google.com/doubleclick-advertisers/current/conversions#encryptedUserIdCandidates)
fields.

> [!IMPORTANT]
> **Important:** If you plan to work with encrypted user IDs you'll need to know how the IDs are encrypted (that is, their [`encryptionInfo`](https://developers.google.com/doubleclick-advertisers/current/EncryptionInfo)). Contact your Campaign Manager 360 account representative or [Campaign Manager 360 support](mailto:dcm-support@google.com) for help determining this.

### Using Data Transfer

> [!WARNING]
> **Warning:** As of May 25, 2018, encrypted user IDs won't be populated in Data Transfer files for users in the European Economic Area. [Learn more](https://support.google.com/dcm/answer/9006418).

[Data Transfer](https://developers.google.com/doubleclick-advertisers/dtv2/overview) is a Campaign Manager 360 feature that provides access to
event-level ad server log data. This data is delivered through separate feeds,
each comprising a single Data Transfer file. Within these files, each recorded
event is associated with an [encrypted user ID](https://support.google.com/dcm/answer/6206106).

To make use of user IDs provided in Data Transfer files, you'll need a way to
match an online ad server event with some event in your offline system. This is
commonly done using [custom Floodlight variables](https://support.google.com/dcm/answer/2823222), which
you can dynamically populate with values that uniquely identify a user action. A
simplified workflow might look like this:

1. A Floodlight activity tag fires, indicating the start of a transaction. The
   tag contains a custom variable value you've provided that uniquely identifies
   the transaction.

2. The transaction continues and completes offline, maintaining the same
   identifier.

3. Using the identifier recorded when the transaction completed, a matching
   entry is located in the Data Transfer activity log file that recorded the
   original Floodlight activity.

IDs retrieved from Data Transfer files must be passed in the
[`encryptedUserId`](https://developers.google.com/doubleclick-advertisers/current/conversions#encryptedUserId) or
[`encryptedUserIdCandidates[]`](https://developers.google.com/doubleclick-advertisers/current/conversions#encryptedUserIdCandidates)
fields.

> [!IMPORTANT]
> **Important:** If you plan to work with encrypted user IDs you'll need to know how the IDs are encrypted (that is, their [`encryptionInfo`](https://developers.google.com/doubleclick-advertisers/current/EncryptionInfo)). Contact your Campaign Manager 360 account representative or [Campaign Manager 360 support](mailto:dcm-support@google.com) for help determining this.