إدراج الإحالات الناجحة

اتصل بـ Conversion.get() لعرض قائمة بكائنات التحويل التي تمت معالجتها في "إعلانات شبكة البحث 360". يمكنك طلب جميع الإحالات الناجحة في حساب محرك المعلن أو تضييق النطاق إلى حملة أو مجموعة إعلانية أو إعلان أو كلمة رئيسية معينة.

تحدّد أرقام تعريف "إعلانات شبكة البحث 360" التي تحدّدها في الطلب نطاق الاستجابة. مثلاً:

  • للاطّلاع على كل الإحالات الناجحة في حساب محرك بحث، حدِّد أرقام التعريف التالية:
    • agencyId
    • advertiserId
    • engineAccountId
  • للاطّلاع على الإحالات الناجحة في حملة معيّنة، حدِّد أرقام التعريف التالية:
    • agencyId
    • advertiserId
    • engineAccountId
    • campaignId
  • للاطّلاع على الإحالات الناجحة المنسوبة إلى إعلان وكلمة رئيسية محدّدين، حدِّد أرقام التعريف التالية:
    • agencyId
    • advertiserId
    • engineAccountId
    • campaignId
    • adGroupId (إذا كانت الكلمة الرئيسية على مستوى المجموعة الإعلانية)
    • adId
    • criterionId

للحصول على معلومات حول الحصول على أرقام تعريف "إعلانات شبكة البحث 360" للمعلن، اطّلِع على الإحالات الناجحة وأرقام التعريف في "إعلانات شبكة البحث 360".

بعد إرسال الطلب، تتحقّق "إعلانات شبكة البحث 360" من صحة الطلب وتنشئ قائمة العناصر وتعرض القائمة كمورد ConversionList في نص الاستجابة.

مثال على طلب الحصول على

يطلب المثال التالي قائمة بالإحالات الناجحة التي حدثت في الفترة من 15 تشرين الثاني (نوفمبر) إلى 31 كانون الأول (ديسمبر) 2012 في حملة معيّنة.

JSON

عند إنشاء عنوان URL لاسترداد قائمة بالإحالات الناجحة، نسِّق المعلّمات الثلاث الأولى، وهي:agencyId وadvertiserId وengineId، كجزء من المسار إلى مورد الإحالة الناجحة. حدّد المعلمات المتبقية كمعامِلات طلب بحث عنوان URL.

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())

مثال على الحصول على رد

في حال نجاح التحقق من صحة الطلب، تعرض "إعلانات شبكة البحث 360" مورد ConversionList في نص الاستجابة.

{
 "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"
  },
  ...
 ]
}

في حالة فشل التحقق من الصحة

وفي حال عدم اجتياز التقرير لعملية التحقّق، تعرض "إعلانات شبكة البحث 360" رسالة الخطأ "لم يتم العثور عليه". على سبيل المثال، إذا لم يحدّد نموذج الطلب أعلاه وكالة فعلية:

Not Found