Custom conversion variables

  • Custom conversion variables let you add extra information, like tags, to conversions imported via the Google Ads API for richer segmented reports.

  • You create custom conversion variables, each corresponding to a tag, with unique names and defined tags.

  • When importing conversions, you associate the created custom variables with their respective values to the conversion.

Custom conversion variables 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. 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 are as follows:

    • name: Identifies the variable. The name must be unique.

    • tag: For our example, the tags are color and status. Tags are used in the event snippet when a conversion is sent to Google Ads by your website. If you use the Google Ads API, you would need to specify the resource name of the custom variables when importing conversions, as detailed in the next step.

    To manage custom conversion variables, such as creating or updating them, use the ConversionCustomVariableService. Specifically, to create new custom conversion variables, call the MutateConversionCustomVariables method within this service. Your request must include one or more ConversionCustomVariableOperation messages.

    For each variable you want to create, include an operation with the create field set to a ConversionCustomVariable object. As mentioned, the required fields for creation arename 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 for complete details on all available operations.

  2. When importing a conversion, such as ClickConversion, set 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: The resource name of the custom variable you created in the previous step.
    • value: The value for the tag you want to associate with the conversion. For our example: blue and new.