// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the License.


// Proto file describing metrics.
syntax = "proto3";

package google.ads.googleads.v0.common;

import "google/protobuf/wrappers.proto";

option java_package = "com.google.ads.googleads.v0.common";
option java_outer_classname = "MetricsProto";
option java_multiple_files = true;

// Objective-C prefix. Google Ads API.
option objc_class_prefix = "GAA";
option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
option php_metadata_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";

// Metrics data.
message Metrics {

  // All conversions divided by the number of ad interactions.
  google.protobuf.DoubleValue all_conversion_rate = 5;

  // The total value of all conversions.
  google.protobuf.DoubleValue all_conversion_value = 6;

  // The total number of conversions. This includes "Conversions" plus
  // conversions that have their "Include in Conversions" setting unchecked.
  google.protobuf.DoubleValue all_conversions = 7;

  // The value of all conversions divided by the total cost of ad interactions
  // (such as clicks for text ads or views for video ads).
  google.protobuf.DoubleValue all_conversions_value_per_cost = 62;

  // The value of all conversions divided by the total number of interactions.
  google.protobuf.DoubleValue all_conversions_value_per_interaction = 61;

  // The average amount you pay per interaction. This amount is the total cost
  // of your ads divided by the total number of interactions.
  google.protobuf.DoubleValue average_cost = 8;

  // The total cost of all clicks divided by the total number of clicks
  // received.
  google.protobuf.DoubleValue average_cpc = 9;

  // Average cost-per-thousand impressions (CPM).
  google.protobuf.DoubleValue average_cpm = 10;

  // Your ad's position relative to those of other advertisers.
  google.protobuf.DoubleValue average_position = 13;

  // Percentage of clicks where the user only visited a single page on your
  // site. Imported from Google Analytics.
  google.protobuf.DoubleValue bounce_rate = 15;

  // The number of clicks.
  google.protobuf.Int64Value clicks = 19;

  // The estimated percent of times that your ad was eligible to show
  // on the Display Network but didn't because your budget was too low.
  // Note: Content budget lost impression share is reported in the range of 0
  // to 0.9. Any value above 0.9 is reported as 0.9001.
  google.protobuf.DoubleValue content_budget_lost_impression_share = 20;

  // The impressions you've received on the Display Network divided
  // by the estimated number of impressions you were eligible to receive.
  // Note: Content impression share is reported in the range of 0.1 to 1. Any
  // value below 0.1 is reported as 0.0999.
  google.protobuf.DoubleValue content_impression_share = 21;

  // The estimated percentage of impressions on the Display Network
  // that your ads didn't receive due to poor Ad Rank.
  // Note: Content rank lost impression share is reported in the range of 0
  // to 0.9. Any value above 0.9 is reported as 0.9001.
  google.protobuf.DoubleValue content_rank_lost_impression_share = 22;

  // Conversions divided by the number of ad interactions (such as clicks for
  // text ads or views for video ads).
  google.protobuf.DoubleValue conversion_rate = 23;

  // The total value of conversions.
  google.protobuf.DoubleValue conversion_value = 24;

  // The value of conversions divided by the cost of ad interactions.
  google.protobuf.DoubleValue conversion_value_per_cost = 64;

  // The value of conversions divided by the number of ad interactions.
  google.protobuf.DoubleValue conversion_value_per_interaction = 63;

  // The number of conversions. This only includes conversion actions which have
  // "Include in Conversions" checked.
  google.protobuf.DoubleValue conversions = 25;

  // The sum of your cost-per-click (CPC) and cost-per-thousand impressions
  // (CPM) costs during this period.
  google.protobuf.Int64Value cost_micros = 26;

  // The cost of ad interactions divided by all conversions.
  google.protobuf.DoubleValue cost_per_all_conversion = 27;

  // The cost of ad interactions divided by conversions.
  google.protobuf.DoubleValue cost_per_conversion = 28;

  // Conversions from when a customer clicks on an AdWords ad on one device,
  // then converts on a different device or browser.
  // Cross-device conversions are already included in all_conversions.
  google.protobuf.DoubleValue cross_device_conversions = 29;

  // The number of clicks your ad receives (Clicks) divided by the number
  // of times your ad is shown (Impressions).
  google.protobuf.DoubleValue ctr = 30;

  // How often people engage with your ad after it's shown to them. This is the
  // number of ad expansions divided by the number of times your ad is shown.
  google.protobuf.DoubleValue engagement_rate = 31;

  // The number of engagements.
  // An engagement occurs when a viewer expands your Lightbox ad. Also, in the
  // future, other ad types may support engagement metrics.
  google.protobuf.Int64Value engagements = 32;

  // Count of how often your ad has appeared on a search results page or
  // website on the Google Network.
  google.protobuf.Int64Value impressions = 37;

  // How often people interact with your ad after it is shown to them.
  // This is the number of interactions divided by the number of times your ad
  // is shown.
  google.protobuf.DoubleValue interaction_rate = 38;

  // The number of interactions.
  // An interaction is the main user action associated with an ad format-clicks
  // for text and shopping ads, views for video ads, and so on.
  google.protobuf.Int64Value interactions = 39;

  // The percentage of clicks filtered out of your total number of clicks
  // (filtered + non-filtered clicks) during the reporting period.
  google.protobuf.DoubleValue invalid_click_rate = 40;

  // Number of clicks Google considers illegitimate and doesn't charge you for.
  google.protobuf.Int64Value invalid_clicks = 41;

  // Percentage of first-time sessions (from people who had never visited your
  // site before). Imported from Google Analytics.
  google.protobuf.DoubleValue percent_new_visitors = 42;

  // Number of offline phone calls.
  google.protobuf.Int64Value phone_calls = 43;

  // Number of offline phone impressions.
  google.protobuf.Int64Value phone_impressions = 44;

  // Number of phone calls received (phone_calls) divided by the number of
  // times your phone number is shown (phone_impressions).
  google.protobuf.DoubleValue phone_through_rate = 45;

  // Your clickthrough rate (Ctr) divided by the average clickthrough rate of
  // all advertisers on the websites that show your ads. Measures how your ads
  // perform on Display Network sites compared to other ads on the same sites.
  google.protobuf.DoubleValue relative_ctr = 46;

  // The estimated percent of times that your ad was eligible to show on the
  // Search Network but didn't because your budget was too low. Note: Search
  // budget lost impression share is reported in the range of 0 to 0.9. Any
  // value above 0.9 is reported as 0.9001.
  google.protobuf.DoubleValue search_budget_lost_impression_share = 47;

  // The impressions you've received divided by the estimated number of
  // impressions you were eligible to receive on the Search Network for search
  // terms that matched your keywords exactly (or were close variants of your
  // keyword), regardless of your keyword match types. Note: Search exact match
  // impression share is reported in the range of 0.1 to 1. Any value below 0.1
  // is reported as 0.0999.
  google.protobuf.DoubleValue search_exact_match_impression_share = 49;

  // The impressions you've received on the Search Network divided
  // by the estimated number of impressions you were eligible to receive.
  // Note: Search impression share is reported in the range of 0.1 to 1. Any
  // value below 0.1 is reported as 0.0999.
  google.protobuf.DoubleValue search_impression_share = 50;

  // The estimated percentage of impressions on the Search Network
  // that your ads didn't receive due to poor Ad Rank.
  // Note: Search rank lost impression share is reported in the range of 0 to
  // 0.9. Any value above 0.9 is reported as 0.9001.
  google.protobuf.DoubleValue search_rank_lost_impression_share = 51;

  // The value of all conversions divided by the number of all conversions.
  google.protobuf.DoubleValue value_per_all_conversions = 52;

  // The value of conversions divided by the number of conversions.
  google.protobuf.DoubleValue value_per_conversion = 53;

  // The total number of view-through conversions.
  // These happen when a customer sees an image or rich media ad, then later
  // completes a conversion on your site without interacting with (e.g.,
  // clicking on) another ad.
  google.protobuf.Int64Value view_through_conversions = 60;
}
