RTB Publisher Settings

Google makes aggregated publisher settings lists available by uploading them to an account-specific Google Cloud Storage bucket (under a project that is owned by Google). You can download these to use for targeting that cannot be done at bidding time. Talk to your technical account manager to enable this feature for your account.

The files containing publisher settings can be downloaded programmatically by using the Cloud Storage API, manually through the Google Developer Console UI, or by using the gsutil command-line tool. See the Google Cloud Storage documentation for more details about accessing data stored in Google Cloud Storage.

The file is gzip-compressed according to RFC 1952. To extract the file from the command line, run gzip -d <filename>. To extract the file programmatically, you can use zlib or a similar compression library that supports gzip format. The result is a serialized protocol buffer, similar to the payload of the POST request in a BidRequest, which can be parsed with the following snippet:

string compressed = /* the payload from the GET request */;
string uncompressed = gunzip(compressed);
PublisherSettingsList publisher_settings;
if (publisher_settings.ParseFromString(uncompressed)) {
  // Process the publisher settings.
}

The protocol buffer definition for PublisherSettingsList can be downloaded from the reference data page. You can also request a compressed publisher-settings.pb.gz file from your account representative. It contains the protocol buffer definition as well as an example publisher settings file.

The ordering of PublisherSettingsList can change at any time. No specific order or sorting is guaranteed. Each entry in the publisher settings list contains an identifier, and several settings that apply to BidRequests tagged with that identifier. You can add a feature to your bidding systems to periodically check for a new publisher settings list. When Google receives an impression that is eligible for real-time bidding, Google includes identifiers in the bid request that correspond to entries in the publisher settings list. Your bidding system can use the publisher settings to filter the candidate ads for that impression. To be eligible for a given impression, the candidate ad must comply with all the publisher setting entries for which identifiers were sent in the request.

Note that any missing publisher settings from the file are due to the identifiers not having blocked URLs associated with them.

The publisher settings file is broken into multiple smaller files to reduce the amount of data that must be downloaded in a single transaction. The files are broken into approximately 5 MB chunks and names as publisher-settings.0.pb.gz through publisher-settings.n.pb.gz (where n is the number of files minus one.) Contact your account representative to obtain these files.