報表

影片:觀看 2019 年飯店廣告報表講座

您可以使用 Google Ads API 設計查詢,以取得所需的飯店廣告報表。 接著就能將這些查詢整合至用戶端應用程式。

必要條件

飯店廣告基本查詢

查看這些查詢範例,瞭解如何熟悉 Google Ads API for Hotel 廣告報表。

取得點擊指標

下列查詢範例會傳回飯店廣告帶來的點擊次數 成效資料檢視

SELECT metrics.clicks
FROM hotel_performance_view

查詢結果應該會如下所示:

{
  "results": [
    {
      "metrics": {
        "clicks": "78090"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/1234567890/hotelPerformanceView"
      }
    }
  ],
  "totalResultsCount": "1",
  "fieldMask": "metrics.clicks"
}

取得區隔點擊指標

下列查詢範例適用於飯店成效資料檢視,獲取點擊次數和區隔 以飯店 ID 劃分的結果

SELECT
  segments.partner_hotel_id,
  metrics.clicks
FROM hotel_performance_view

查詢結果應該會與下方 JSON 字串類似。 系統會按照 partnerHotelID 區隔點擊,因此可包含兩個以上的物件 查看同一個 HotelPerformanceView 的結果

{
  "results": [
    {
      "metrics": {
        "clicks": "7055"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/1234567890/hotelPerformanceView"
      },
      "segments": {
        "partnerHotelId": "1111"
      }
    },
    {
      "metrics": {
        "clicks": "3047"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/1234567890/hotelPerformanceView"
      },
      "segments": {
        "partnerHotelId": "1112"
      }
    },
    ...
  ]
}

取得廣告群組指標

下方範例廣告群組查詢透過 最近 30 天 (按日期區隔)

SELECT
  campaign.name,
  campaign.status,
  ad_group.name,
  segments.date,
  metrics.impressions,
  metrics.clicks
FROM ad_group
WHERE ad_group.type = HOTEL_ADS
  AND segments.date DURING LAST_30_DAYS

查詢結果應該會與下方 JSON 字串類似。 系統只會針對符合 WHERE 子句的指標篩選回應 條件。日期欄位會填入過去 30 天內的最後日期 。

{
  "results": [
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789",
        "name": "test campaign",
        "status": "ENABLED"
      },
      "adGroup": {
        "resourceName": "customers/123456789/adGroups/11111111",
        "name": "test adgroup"
      },
      "metrics": {
        "clicks": "91",
        "impressions": "5145"
      },
      "segments": {
        "date": "2020-05-10"
      }
    }
  ]
}

取得已啟用的廣告群組廣告

下列廣告群組廣告查詢範例會取得要放送的廣告群組。 廣告群組廣告、廣告群組和廣告活動必須一併放送,才能放送任何廣告群組。 全部都會啟用

SELECT
  ad_group.id,
  ad_group.name,
  ad_group.status,
  campaign.name,
  campaign.status,
  ad_group_ad.status
FROM ad_group_ad
WHERE ad_group_ad.status = ENABLED
  AND campaign.status = ENABLED
  AND ad_group.status = ENABLED

查詢結果應該會與下方 JSON 字串類似。

{
  "results": [
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789",
        "name": "test campaign",
        "status": "ENABLED"
      },
      "adGroup": {
        "resourceName": "customers/123456789/adGroups/111111111111",
        "id": "106121857411",
        "name": "test adgroup",
        "status": "ENABLED"
      },
      "adGroupAd": {
        "resourceName": "customers/123456789/adGroupAds/111111111111~33333333333",
        "status": "ENABLED",
        "ad": {
          "resourceName": "customers/123456789/ads/77777777777"
        }
      }
    }
  ]
}

飯店廣告報表的實用資料檢視

在先前的飯店廣告報表 API 中,您可以擷取特定報表、 例如成效報表在 Google Ads API 中,這類資料是 以個別 *_view 資源表示,例如 hotel_performance_viewhotel_group_view。本節會說明要部署的 *_view 資源 協助飯店廣告報表您也可以查詢範例。

請注意,每項 *_view 資源都有特定的資源欄位、區隔和 指標。請參閱該 *_view 資源的說明文件 即可建構查詢

飯店群組檢視畫面

飯店群組檢視畫面是一項條件 資料檢視),因此適合擷取指標 特定條件類型的飯店群組

以下查詢範例針對飯店群組觀看次數,為下列其中的每間飯店帶來點擊次數: 整個飯店商家資訊群組樹狀結構 (含根節點) 的商家資訊群組 (「所有飯店」)。

SELECT
  metrics.clicks,
  ad_group_criterion.listing_group.case_value.hotel_id.value
FROM hotel_group_view

查詢結果應該會與下方 JSON 字串類似。 由於 case_value 未定義根節點 (「所有飯店」),因此會 第一列代表「所有飯店」的指標商家資訊 第二列則代表下層商家資訊群組的指標 代表「其他」

{
  "results": [
    {
      "metrics": {
        "clicks": "5"
      },
      "adGroupCriterion": {
        "resourceName": "customers/1234567890/adGroupCriteria/22222222222~111111111111"
      },
      "hotelGroupView": {
        "resourceName": "customers/1234567890/hotelGroupViews/22222222222~111111111111"
      }
    },
    {
      "metrics": {
        "clicks": "0"
      },
      "adGroupCriterion": {
        "resourceName": "customers/1234567890/adGroupCriteria/22222222222~111111111112"
        "listingGroup": {
          "caseValue": {
            "hotelId": {
            }
          }
        }
      },
      "hotelGroupView": {
        "resourceName": "customers/1234567890/hotelGroupViews/22222222222~111111111112"
      }
    },
    {
      "metrics": {
        "clicks": "3"
      },
      "adGroupCriterion": {
        "resourceName": "customers/1234567890/adGroupCriteria/22222222222~111111111113"
        "listingGroup": {
          "caseValue": {
            "hotelId": {
              "value": "11111111111111111"
              }
            }
          }
        }
      },
      "hotelGroupView": {
        "resourceName": "customers/1234567890/hotelGroupViews/22222222222~111111111113"
      }
    },
    {
      "metrics": {
        "clicks": "2"
      },
      "adGroupCriterion": {
        "resourceName": "customers/1234567890/adGroupCriteria/22222222222~111111111114"
        "listingGroup": {
          "caseValue": {
            "hotelId": {
              "value": "11111111111111112"
              }
            }
          }
        }
      },
      "hotelGroupView": {
        "resourceName": "customers/1234567890/hotelGroupViews/22222222222~111111111114"
      }
    },
  ]
}

飯店成效資料檢視

飯店成效資料檢視: 想要使用尚未取得的資料 擷取到飯店群組的廣告 (即使是以飯店 ID 為依據的子群組)。

下列查詢範例適用於飯店成效資料檢視,獲取點擊次數和區隔 以飯店 ID 劃分的結果

SELECT
  segments.partner_hotel_id,
  metrics.clicks
FROM hotel_performance_view

查詢結果應該會與下方 JSON 字串類似。 點擊次數是依照 partner_hotel_id 劃分,因此可以有兩個以上的物件 針對相同的飯店成效資料檢視 傳回的值

{
  "results": [
    {
      "metrics": {
        "clicks": "7055"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/1234567890/hotelPerformanceView"
      },
      "segments": {
        "partnerHotelId": "1111"
      }
    },
    {
      "metrics": {
        "clicks": "3047"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/1234567890/hotelPerformanceView"
      },
      "segments": {
        "partnerHotelId": "1112"
      }
    },
    ...
  ]
}

廣告群組目標對象檢視

廣告群組目標對象資料檢視方便您使用 想針對附加至廣告群組的目標對象擷取成效指標 第二,自訂角色只能 套用至專案或機構

請注意,這裡是各類廣告活動 (而非只有飯店) 的一般資料檢視 廣告活動。這個檢視也能用來劃分結果 hotel_date_selection_type,可用於指定飯店日期 預設日期,或是 Google 搜尋的預設日期。如果 您按hotel_date_selection_type區隔,只有飯店廣告活動的成效 。

以下查詢會傳回每一列 ad_group_criterion.user_list.user_list

SELECT
  ad_group.id,
  campaign.id,
  ad_group_criterion.user_list.user_list,
  segments.device,
  segments.hotel_date_selection_type,
  metrics.impressions,
  metrics.clicks,
  metrics.cost_micros,
  metrics.conversions,
  metrics.all_conversions_value
FROM ad_group_audience_view

查詢結果應該會與下方 JSON 字串類似。

{
  "results": [
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789",
        "id": "23456789"
      },
      "metrics": {
        "clicks": "0",
        "conversions": "0",
        "costMicros": "0",
        "impressions": "3",
        "allConversionsValue": "0"
      },
      "adGroupCriterion": {
        "resourceName": "customers/123456789/adGroupCriteria/23456789~789456",
        "userList": {
          "userList": "customers/123456789/userLists/456789"
        }
      },
      "adGroupAudienceView": {
        "resourceName": "customers/8005193609/adGroupAudienceViews/23456789~789456"
      },
      "segments": {
        "device": "TABLET",
        "hotelDateSelectionType": "USER_SELECTED"
      }
    }
  ]
}

廣告活動目標對象資料檢視

廣告活動目標對象資料檢視方便您使用 想為廣告活動中附加的目標對象擷取成效指標 第二,自訂角色只能 套用至專案或機構

請注意,這裡是各類廣告活動 (而非只有飯店) 的一般資料檢視 廣告活動。這個檢視也能用來劃分結果 hotel_date_selection_type,可用於指定飯店日期 預設日期,或是 Google 搜尋的預設日期。如果 您按hotel_date_selection_type區隔,只有飯店廣告活動的成效 。

以下查詢會傳回每一列 campaign_criterion.user_list.user_list

SELECT
  campaign.id,
  campaign_criterion.user_list.user_list,
  segments.device,
  segments.hotel_date_selection_type,
  metrics.impressions,
  metrics.clicks,
  metrics.cost_micros,
  metrics.conversions,
  metrics.all_conversions_value
FROM campaign_audience_view

查詢結果應該會與下方 JSON 字串類似。

{
  "results": [
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789",
        "id": "23456789"
      },
      "metrics": {
        "clicks": "0",
        "conversions": "0",
        "costMicros": "0",
        "impressions": "3",
        "allConversionsValue": "0"
      },
      "campaignCriterion": {
        "resourceName": "customers/123456789/campaignCriteria/23456789~789456",
        "userList": {
          "userList": "customers/123456789/userLists/456789"
        }
      },
      "campaignAudienceView": {
        "resourceName": "customers/8005193609/campaignAudienceViews/23456789~789456"
      },
      "segments": {
        "device": "TABLET",
        "hotelDateSelectionType": "USER_SELECTED"
      }
    }
  ]
}

飯店廣告的實用報表

這個部分提供幾項專為飯店業者設計的實用報表 廣告。

成效報表

這些查詢會使用飯店成效檢視畫面取得成效資料。

hotel_performance_view 可讓您使用 campaign 資源來區隔 指標。舉例來說,您可以使用 campaign.id 欄位取得效能 指標。

成效

查詢範例:

SELECT
  segments.hotel_center_id,
  segments.device,
  segments.partner_hotel_id,
  segments.hotel_check_in_day_of_week,
  segments.hotel_date_selection_type,
  segments.hotel_length_of_stay,
  segments.hotel_booking_window_days,
  metrics.search_top_impression_share,
  metrics.search_absolute_top_impression_share,
  metrics.impressions,
  metrics.clicks,
  metrics.cost_micros,
  metrics.conversions,
  metrics.all_conversions_value,
  metrics.search_impression_share
FROM hotel_performance_view

JSON 回應範例:

{
  "results": [
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789"
      },
      "metrics": {
        "clicks": "0",
        "conversions": "0.0",
        "costMicros": "0",
        "impressions": "0",
        "searchImpressionShare": "0.0999",
        "searchAbsoluteTopImpressionShare": "0.0999",
        "searchTopImpressionShare": "0.0999",
        "allConversionsValue": "1"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "device": "DESKTOP",
        "hotelBookingWindowDays": "3",
        "hotelCenterId": "1234",
        "hotelCheckInDayOfWeek": "MONDAY",
        "hotelDateSelectionType": "USER_SELECTED",
        "hotelLengthOfStay": "4",
        "partnerHotelId": "123"
      }
    },
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789"
      },
      "metrics": {
        "clicks": "0",
        "conversions": "0.0",
        "costMicros": "0",
        "impressions": "1",
        "searchImpressionShare": "1.0",
        "searchAbsoluteTopImpressionShare": "0.0999",
        "searchTopImpressionShare": "1.0",
        "allConversionsValue": "1"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "device": "DESKTOP",
        "hotelBookingWindowDays": "3",
        "hotelCenterId": "1234",
        "hotelCheckInDayOfWeek": "MONDAY",
        "hotelDateSelectionType": "USER_SELECTED",
        "hotelLengthOfStay": "4",
        "partnerHotelId": "123"
      }
    }
  ]
}

點擊類型成效

查詢範例:

SELECT
  segments.click_type,
  segments.hotel_center_id,
  segments.device,
  segments.partner_hotel_id,
  segments.hotel_check_in_day_of_week,
  segments.hotel_date_selection_type,
  segments.hotel_length_of_stay,
  segments.hotel_booking_window_days,
  metrics.impressions,
  metrics.clicks,
  metrics.cost_micros,
  metrics.conversions,
  metrics.all_conversions_value
FROM hotel_performance_view

JSON 回應範例:

{
  "results": [
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789"
    },
      "metrics": {
        "clicks": "0",
        "conversions": "0.0",
        "costMicros": "0",
        "impressions": "1",
        "allConversionsValue": "0.0"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "device": "DESKTOP",
        "hotelBookingWindowDays": "0",
        "hotelCenterId": "1234",
        "hotelCheckInDayOfWeek": "TUESDAY",
        "hotelDateSelectionType": "USER_SELECTED",
        "hotelLengthOfStay": "4",
        "partnerHotelId": "123",
        "clickType": "HOTEL_PRICE"
      }
    },
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789"
      },
      "metrics": {
        "clicks": "1",
        "conversions": "0.0",
        "costMicros": "0",
        "impressions": "1",
        "allConversionsValue": "0.0"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "device": "DESKTOP",
        "hotelBookingWindowDays": "0",
        "hotelCenterId": "1234",
        "hotelCheckInDayOfWeek": "TUESDAY",
        "hotelDateSelectionType": "USER_SELECTED",
        "hotelLengthOfStay": "4",
        "partnerHotelId": "12345",
        "clickType": "HOTEL_PRICE"
      }
    }
  ]
}

條件式費率成效報表

下列查詢會依照以下條件區隔成效指標:

  • campaign
  • hotel_center_id
  • hotel_country
  • hotel_rate_rule_id
  • hotel_rate_type
  • device
  • partner_hotel_id

請參閱 HotelRateType 以及類型說明

查詢中可包含多個區隔;但傳回的數量 加入額外區隔後,列數可能會大幅增加。

SELECT
  campaign.id,
  segments.hotel_center_id,
  segments.hotel_country,
  segments.hotel_rate_rule_id,
  segments.hotel_rate_type,
  segments.device,
  segments.partner_hotel_id,
  metrics.search_top_impression_share,
  metrics.search_absolute_top_impression_share,
  metrics.impressions,
  metrics.clicks,
  metrics.cost_micros,
  metrics.conversions
FROM hotel_performance_view

查詢結果應該會與下方 JSON 字串類似。

{
  "results": [
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789",
        "id": "23456789"
      },
      "metrics": {
        "clicks": "1",
        "conversions": "0.0",
        "costMicros": "0",
        "impressions": "24",
        "searchAbsoluteTopImpressionShare": "0.0999",
        "searchTopImpressionShare": "0.17073170731707318"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "device": "TABLET",
        "hotelCenterId": "1234",
        "partnerHotelId": "123",
        "hotelRateRuleId": "desktop",
        "hotelRateType": "PUBLIC_RATE"
      }
    },
    {
      "campaign": {
        "resourceName": "customers/123456789/campaigns/23456789",
        "id": "23456789"
      },
      "metrics": {
        "clicks": "107",
        "conversions": "0.0",
        "costMicros": "0",
        "impressions": "1668",
        "searchAbsoluteTopImpressionShare": "0.0999",
        "searchTopImpressionShare": "0.3581201665675193"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "device": "TABLET",
        "hotelCenterId": "1234",
        "partnerHotelId": "1235",
        "hotelRateRuleId": "desktop",
        "hotelRateType": "PUBLIC_RATE"
      }
    }
  ]
}

價格競爭力報表

方便你深入瞭解自家價格與競爭對手的價格的 相同的飯店行程

查詢範例:

SELECT
  segments.hotel_center_id,
  segments.partner_hotel_id,
  segments.hotel_price_bucket,
  metrics.hotel_average_lead_value_micros,
  metrics.hotel_price_difference_percentage
FROM hotel_performance_view

JSON 回應範例:

{
  "results": [
    {
      "metrics": {
        "hotelAverageLeadValueMicros": "96416341.829268292",
        "hotelPriceDifferencePercentage": "-0.014627310872986811"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "hotelCenterId": "1234",
        "partnerHotelId": "123",
        "hotelPriceBucket": "LOWEST_TIED"
      }
    }
  ]
}

平均預訂價格報表

你可以取得計算平均預訂價格所需的資料 (all_conversions_value 除以 conversions) 的飯店。

查詢範例:

SELECT
  segments.hotel_center_id,
  segments.partner_hotel_id,
  segments.hotel_price_bucket,
  metrics.all_conversions_value,
  metrics.conversions
FROM hotel_performance_view

JSON 回應範例:

{
  "results": [
    {
      "metrics": {
        "allConversionsValue": "123.5",
        "conversions": "1"
      },
      "hotelPerformanceView": {
        "resourceName": "customers/123456789/hotelPerformanceView"
      },
      "segments": {
        "hotelCenterId": "1234",
        "partnerHotelId": "123",
        "hotelPriceBucket": "LOWEST_TIED"
      }
    }
  ]
}

目標對象報表

目標對象報表會顯示 Google Ads 目標對像出價調節係數的成效 清單。如需目標對象報表的範例,請參閱「廣告群組」中的查詢範例 目標對象檢視廣告活動目標對象 檢視畫面

飯店對帳報表

飯店對帳報表包含 能夠與廣告客戶對飯店預訂資料進行對帳的轉換資訊 。您可以透過大量上傳功能上傳資料,讓 Google 知道 已取消或完成預訂這份報表中的主要資料欄為 如下:

使用者介面欄 API 欄 說明
訂房價值 metrics.value_per_conversions_by_conversion_date 代碼回報的轉換價值
轉換日期 segments.date 預訂日期
佣金費率 metrics.hotel_commission_rate_micros 您為廣告曝光出價的訂房價值百分比
佣金費用

如果 status == RECONCILEDCANCELED,則 值可以計算為 metrics.hotel_commission_rate_micros * hotel_reconciliation.reconciled_value_micros在其他情況下 您可以從 metrics.hotel_expected_commission_cost 欄,或 計算方式為 metrics.hotel_commission_rate_micros * metrics.value_per_conversions_by_conversion_date

您預計或已支付房客入住的金額