[Custom conversion variables](https://support.google.com/google-ads/answer/9964350) let you associate additional information, in
the form of tags, to a conversion that you import using the Google Ads API, such as
click or call conversions. With this information, you can create segmented
reports that provide richer data about your conversions.

For example, when importing a conversion for the purchase of a new blue hat,
you could also import two associated tags: `color` and `status` with the values
`blue` and `new`, respectively. Here are the steps:

1. Create as many custom conversion variables as you need (up to the account
   limit of 50 custom conversion variables per customer account). Each variable
   corresponds to one tag. Therefore, if you want two tags (`color` and
   `status`), you need to create two custom variables. The required fields for
   [`ConversionCustomVariable`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariable) are as follows:

   - [`name`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariable#name): Identifies the variable. The name must be unique across the
     customer account.

   - [`tag`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariable#tag): For our example, the tags are `color` and `status`. The
     `tag` must be unique across the customer account and cannot contain
     spaces. Tags are used in the [event snippet](https://support.google.com/google-ads/answer/9962082#Add&zippy=%2Cconversion-tracking-using-tags-on-your-website) when a conversion is
     sent to Google Ads by your website. If you use the Google Ads API, you need to
     specify the resource name of the custom variables when importing
     conversions, as detailed in the next step.

   > [!NOTE]
   > **Note:** See [`ConversionCustomVariable`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariable) for limitations on its fields.

   To manage custom conversion variables, such as creating or updating them,
   use the [`ConversionCustomVariableService`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariableService). Specifically, to create new
   custom conversion variables, call the
   [`MutateConversionCustomVariables`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariableService/MutateConversionCustomVariables) method within this service. Your
   request must include one or more [`ConversionCustomVariableOperation`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariableOperation)
   messages.

   For each variable you want to create, include an operation with the `create`
   field set to a [`ConversionCustomVariable`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariable) object. As mentioned, the
   required fields for creation are `name` and `tag`.

   After successful creation, these variables will be in an `ENABLED` or
   `ACTIVATION_NEEDED` state. Depending on the setup, check the `status` field
   in the response. You can then use their resource names when uploading
   conversions.

   Refer to [`ConversionCustomVariableService`](https://developers.google.com/google-ads/api/reference/rpc/v26/ConversionCustomVariableService) for complete details on all
   available operations.
2. When importing a conversion, such as [`ClickConversion`](https://developers.google.com/google-ads/api/reference/rpc/v26/ClickConversion) or
   [`CallConversion`](https://developers.google.com/google-ads/api/reference/rpc/v26/CallConversion#custom_variables), set [`custom_variables`](https://developers.google.com/google-ads/api/reference/rpc/v26/ClickConversion#custom_variables) to the list of all
   custom variables you created in the previous step. You need to set all the
   fields of each custom variable:

   - [`conversion_custom_variable`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomVariable#conversion_custom_variable): The resource name of the custom variable you created in the previous step.
   - [`value`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomVariable#value): The value for the tag you want to associate with the conversion. For our example: `blue` and `new`.