Magnite Prebid
The Magnite Prebid Connector provides automated access to the Magnite DV API
Prerequisites
The Magnite Prebid connector requires you create a Key withe Credential Type Magnite Prebid.
You will need to provide:
- Key (e.g., your user name)
- Secret
Scheduling
The Magnite Prebid connector can be scheduled to ingest data once per day at a user-defined hour and timezone.
By default, the connector will run once at 6am PT.
See Daily Scheduling for more information.
Parameters
This connector consists of the following types (specified in the SBS script, see below)
-
magnite_prebid:historical
- Gives data up to 90 minutes ago and can go back to a year -
magnite_prebid:realtime
Pulls data up to 40 minutes from the current time and can go back 7 days
- account_id string
- required
- This is a required value provided by the customer account
- dimensions string list
- required
- See API Documentation for details
"Hour", "Date", "Week", "Month", "Quarter", "Year", "pb_account", "pb_account_id",
"pb_site", "pb_site_id", "pb_zone", "pb_zone_id", "pb_channel", "pb_ad_unit_code",
"pb_gam_ad_slot", "pb_domain", "pb_subdomain", "pb_adomains", "pb_user_id_providers",
"pb_metro_code", "pb_metro_code_city", "pb_country", "pb_ad_slot", "pb_device_class",
"pb_wrapper_name", "pb_wrapper_family", "pb_ad_unit_pattern", "pb_browser",
"pb_version", "pb_ad_request_sizes", "pb_ad_request_media_types",
"pb_ad_response_sizes", "pb_ad_response_media_types", "pb_gdpr_applies",
"pb_gdpr_version", "pb_app_sdk_version", "pb_app_bundle", "pb_wrapper_rule",
"pb_bidder_name", "pb_bid_source", "pb_bid_request_sizes",
"pb_bid_request_media_types", "pb_bid_response_size", "pb_bid_response_media_type",
"pb_status", "pb_deal_id", "pb_deal", "pb_client_latency_25_millis_bucket",
"pb_server_latency_25_millis_bucket", "pb_server_has_user_id", "pb_revenue_source",
"pb_ad_dimensions", "pb_video_adformat", "pb_media_types", "pb_demand_source",
"pb_winning_bidder_name", "pb_gam_advertiser", "pb_gam_advertiser_id",
"pb_gam_line_type", "pb_gam_line_item_name", "pb_gam_line_item_id",
"pb_gam_creative_name", "pb_gam_creative_id", "Author", "Page_layout",
"UTM_campaign", "Gender"
- metrics string list
- required
- See API Documentation for details
"pb_ad_requests", "pb_ad_responses", "pb_ad_request_cpm", "pb_ad_win_rate",
"pb_ad_response_rate", "pb_ad_fill_rate", "pb_auctions", "pb_bid_requests",
"pb_bid_responses", "pb_valid_bids", "pb_no_bid_responses",
"pb_timeout_bids", "pb_rejected_bids", "pb_avg_bid_cpm",
"pb_bid_request_cpm", "pb_bidder_win_rate", "pb_bidder_response_rate",
"pb_bidder_fill_rate", "pb_no_bid_responses_rate", "pb_timeout_bids_rate",
"pb_rejected_bids_rate", "pb_bid_response_revenue",
"pb_avg_client_latency", "pb_avg_server_latency", "pb_wrapper_impressions",
"pb_ecpm", "pb_wrapper_ad_spend", "pb_total_impressions",
"pb_total_wrapper_ad_spend", "pb_demand_source_ecpm",
"pb_non_wrapper_impressions", "pb_non_wrapper_ad_spend"
- timezone string
- optional
- Undocumented API parameter. Format is of the type America/Los_Angeles
Sample Switchboard Script
Take note how the capitalized metric Hour, Day, come back as lowercase
download t from {
download magnite_raw from {
type: "magnite_prebid:historical";
key: "magnight_prebid_key";
account_id: "7450";
metrics: ["pb_valid_bids","pb_no_bid_responses","pb_timeout_bids","pb_rejected_bids","pb_avg_bid_cpm"];
dimensions: ["Date","Hour","pb_account","pb_site_id","pb_zone","pb_gam_ad_slot","pb_user_id_providers"];
} using { pb_valid_bids: string;
pb_no_bid_responses: string;
pb_timeout_bids: string;
"date": datetime;
hour: datetime;
pb_site_id: string;
};
export magnite_raw to {
type: "bigquery:load";
project: "switchboard-development-1300";
dataset: "temp_1day_us";
table: "magnite_data";
test_table: "magnite_data";
key: "goog_key";
primary_source_name: "magnite_raw";
truncate: true;
format: "parquet";
};