Reporting

Video: Check out the Hotel Ads reporting talk from the 2019 workshop

With the Google Ads API, you can design queries to get the Hotel Ads reports you need. You can then incorporate these queries into your client applications.

Prerequisites

Basic queries for Hotel Ads

Check out these example queries to get familiar with using the Google Ads API for Hotel Ads reporting.

Get clicks metrics

The following example query returns the number of clicks from the hotel performance view.

SELECT metrics.clicks
FROM hotel_performance_view

The results from the query would look something like this:

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

Get segmented clicks metrics

The following example query for hotel performance views gets clicks and segments the results by Hotel ID.

SELECT
  segments.partner_hotel_id,
  metrics.clicks
FROM hotel_performance_view

The results from the query would look something like the following JSON string. The clicks are segmented by partnerHotelID and thus two or more objects can be returned for the same hotelPerformanceView.

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

Get ad group metrics

The following example query for ad groups gets impressions and clicks over the last 30 days, segmented by date.

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

The results from the query would look something like the following JSON string. The response is filtered for only the metrics meeting the WHERE clause conditions. The date field is populated by the last date included in the 30 day period.

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

Get enabled ad group ads

The following example query for ad group ads gets the ad groups that will serve. For any ad group to serve, the ad group ad, the ad group, and the campaign must all be enabled.

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

The results from the query would look something like the following JSON string.

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

Useful views for Hotel Ads reporting

In prior APIs for Hotel Ads reporting, you could retrieve a specific report, such as a performance report. In the Google Ads API, this kind of data is represented in separate *_view resources, such as hotel_performance_view and hotel_group_view. This section describes the *_view resources that are useful for Hotel Ads reporting. Example queries are also provided.

Note that each *_view resource has specific resource fields, segments, and metrics. Consult the documentation for the specific *_view resource before constructing your query.

Hotel Group View

The Hotel Group View is a criteria view, so it's useful for retrieving metrics for a specific criteria type of a hotel group.

The following example query for hotel group views gets clicks for each hotel in a listing group for the entire hotel listing group tree, including the root node ("All hotels").

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

The results from the query would look something like the following JSON string. Given that case_value is undefined for the root node ("All hotels"), it's apparent that the first row represents the metrics for the "All hotels" listing group, while the second row represents the metrics for the child listing group representing "Other".

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

Hotel Performance View

The Hotel Performance View is useful if you want to retrieve performance metrics for a hotel using data that does not come from a hotel grouping, even if you have a subdivision based on Hotel ID.

The following example query for hotel performance views gets clicks and segments the results by Hotel ID.

SELECT
  segments.partner_hotel_id,
  metrics.clicks
FROM hotel_performance_view

The results from the query would look something like the following JSON string. The clicks are segmented by partner_hotel_id and thus two or more objects can be returned for the same hotel performance view.

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

Ad Group Audience View

The Ad Group Audience View is useful if you want to retrieve performance metrics for audiences attached at the ad group level.

Note that this is a general view for various types of campaigns, not just hotel campaigns. This view also provides the ability to segment results by hotel_date_selection_type, which can be used to specify whether the hotel date was selected by the user or was a default date for the search set by Google. If you segment by hotel_date_selection_type, only results for hotel campaigns are returned.

The following query returns one row per 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

The results from the query would look something like the following JSON string.

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

Campaign Audience View

The Campaign Audience View is useful if you want to retrieve performance metrics for audiences attached at the campaign level.

Note that this is a general view for various types of campaigns, not just hotel campaigns. This view also provides the ability to segment results by hotel_date_selection_type, which can be used to specify whether the hotel date was selected by the user or was a default date for the search set by Google. If you segment by hotel_date_selection_type, only results for hotel campaigns are returned.

The following query returns one row per 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

The results from the query would look something like the following JSON string.

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

Useful reports for Hotel Ads

This section provides several useful reports designed specifically for Hotel ads.

Performance reports

These queries make use of the Hotel Performance View to get performance data.

A hotel_performance_view lets you use the campaign resource to segment metrics. For example, you can use the campaign.id field to get performance metrics by campaign.

Performance

Example query:

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

Example JSON response:

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

Performance with click type

Example query:

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

Example JSON response:

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

Conditional rates performance report

The following query gets performance metrics segmented by:

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

See HotelRateType for a description of the types.

Multiple segments can be included in a query; however, the number of returned rows can increase significantly with additional segments.

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

The results from the query would look something like the following JSON string.

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

Price competitiveness report

You can get insights into how your prices compare to competitors' prices on the same hotel itineraries.

Example query:

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

Example JSON response:

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

Average booked price report

You can get the data needed to calculate the average booked price (all_conversions_value divided by conversions) for hotels.

Example query:

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

Example JSON response:

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

Audience reports

Audience reports show performance of bid multipliers on Google Ads audience lists. For examples of audience reports, see the example queries in Ad Group Audience View and Campaign Audience View.

Hotel Reconciliation report

Hotel Reconciliation report contains conversion information from Hotel bookings to reconcile with the advertiser records. You can upload data through bulk uploads to let Google know which bookings were canceled or completed. The main columns in this report are as follows:

UI Column API Column Explanation
Booking value metrics.value_per_conversions_by_conversion_date The conversion value as reported by the tag
Conversion date segments.date The date of the booking
Commission rate metrics.hotel_commission_rate_micros The percentage of booking value that you bid for an ad impression
Commission cost

If status == RECONCILED or CANCELED, then this value can be calculated as metrics.hotel_commission_rate_micros * hotel_reconciliation.reconciled_value_micros. In all other cases, this value can be obtained from the metrics.hotel_expected_commission_cost column, or calculated as metrics.hotel_commission_rate_micros * metrics.value_per_conversions_by_conversion_date

The amount you are expected to pay or have paid for the guest stay