List Conversions

Call Conversion.get() to return a list of conversion objects that have been processed in Search Ads 360. You can request all conversions in an advertiser's engine account or narrow the scope to a specific campaign, ad group, ad or keyword.

The Search Ads 360 IDs that you specify in the request determine the scope of the response. For example:

  • To see all conversions in an engine account, specify these IDs:
    • agencyId
    • advertiserId
    • engineAccountId
  • To see the conversions in a specific campaign, specify these IDs:
    • agencyId
    • advertiserId
    • engineAccountId
    • campaignId
  • To see the conversions that are attributed to a specific ad and keyword, specify these IDs:
    • agencyId
    • advertiserId
    • engineAccountId
    • campaignId
    • adGroupId (if the keyword exists at the ad group level)
    • adId
    • criterionId

For information on the obtaining Search Ads 360 IDs for your advertiser, see Search Ads 360 IDs and Conversions.

After you send the request, Search Ads 360 validates the request, generates the list of objects, and returns the list as a ConversionList resource in the response body.

Example Get request

The following example requests the list of conversions that occurred from November 15 to December 31, 2012 in a specific campaign.

JSON

When you construct a URL to retrieve a list of conversions, format the first three parameters—agencyId, advertiserId, and engineId—as part of the path to the conversion resource. Specify the remaining parameters as URL query parameters.

GET https://www.googleapis.com/doubleclicksearch/v2/agency/12300000000000456/advertiser/45600000000010291/engine/700000000042441/conversion?campaign=71700000001899732&startDate=20121115&endDate=20121231&startRow=0&rowCount=10
          

Java

  /**
   * Instantiate the Doubleclicksearch service, request a list of conversions in a specific campaign,
   * and print the list to standard out.
   */
  public static void main(String[] args) throws Exception {

    Doubleclicksearch service = getService(); // See Set Up Your Application.
    ConversionList conversionList = listConversions(service);
    outputList(conversionList);
  }


  /**
   * Request a list of the first 10 conversions in a specific campaign.
   */
  private static ConversionList listConversions(Doubleclicksearch service) throws IOException {
    try {
      Get getRequest = service.conversion().get(
          new Long(12300000000000456L), // Replace with your agency ID
          new Long(45600000000010291L), // Replace with your advertiser ID
          new Long(700000000042441L), // Replace with your engine account ID
          new Integer(20121231), // End date
          new Integer(10), // Number of rows
          new Integer(20121115), // Start date
          new Long(0L)); // Starting row
      getRequest.setCampaignId(71700000002044839L); // Optional parameter

      return getRequest.execute();
    } catch (GoogleJsonResponseException e) {
      System.err.println("Get request was rejected.");
      for (ErrorInfo error : e.getDetails().getErrors()) {
        System.err.println(error.getMessage());
      }
      System.exit(e.getStatusCode());
      return null; // Unreachable code.
    }
  }

 /**
  * Print to standard out.
  */
  privte static void outputList(ConversionList conversionList) {
    for (Conversion conversion : conversionList.getConversion()) {
      if (null != conversion) {
        System.out.println(conversion.toString());
      }
    }
  }
          

Python

def get_conversion(service):
  """Request the first 10 conversions in a specific campaign
     and print the list.

  Args:
    service: An authorized Doubleclicksearch service. See Set Up Your Application.
  """
  request = service.conversion().get(
      agencyId='12300000000000456', // Replace with your ID
      advertiserId='45600000000010291', // Replace with your ID
      engineAccountId='700000000042441', // Replace with your ID
      campaignId='71700000002044839', // Replace with your ID
      startDate=20131115,
      endDate=20131231,
      startRow=0,
      rowCount=10
  )

  pprint.pprint(request.execute())

Example Get response

If the request validatation succeeds, Search Ads 360 returns a ConversionList resource in the response body.

{
 "kind": "doubleclicksearch#conversionList",
 "conversion": [
  {
   "agencyId": "12300000000000456",
   "advertiserId": "45600000000010291",
   "engineAccountId": "700000000042441",
   "campaignId": "71700000002044839",
   "adGroupId": "58700000032026064",
   "criterionId": "43700003491981017",
   "adId": "0",
   "dsConversionId": "48752623802180029",
   "conversionId": "ag5zfmV2ZW50YXBpZGVtb3ITCxILVHJhbnNhY3Rpb24YgfQDDA",
   "state": "ACTIVE",
   "type": "TRANSACTION",
   "revenueMicros": "20000000", // 20 million revenueMicros is equivalent to $20 of revenue
   "currencyCode": "USD",
   "quantityMillis": "0",
   "segmentationType": "FLOODLIGHT",
   "segmentationId": "25700000001081555",
   "segmentationName": "Customer Call",
   "conversionTimestamp": "1355776573000",
   "conversionModifiedTimestamp": "1355776580813"
  },
  {
   "agencyId": "12300000000000456",
   "advertiserId": "45600000000010291",
   "engineAccountId": "700000000042441",
   "campaignId": "71700000002044839",
   "adGroupId": "58700000032026064",
   "criterionId": "43700003491981017",
   "adId": "44700000155906860",
   "dsConversionId": "48752623802180029",
   "conversionId": "ag5zfmV2ZW50YXBpZGVtb3ITCxILVHJhbnNhY3Rpb24YgfQDDA",
   "state": "ACTIVE",
   "type": "TRANSACTION",
   "revenueMicros": "20000000",
   "currencyCode": "USD",
   "quantityMillis": "0",
   "segmentationType": "FLOODLIGHT",
   "segmentationId": "25700000001081555",
   "segmentationName": "Customer Call",
   "conversionTimestamp": "1355776573000",
   "conversionModifiedTimestamp": "1355776580813"
  },
  ...
 ]
}

If validation fails

If the report does not pass validation, Search Ads 360 returns a "Not found" error. For example, if the example request above did not specify a real agency:

Not Found