Skip to content

DV360 BidKitProduction Custom Bidding DSL Engine

Turn DV360 report data into verified, high-performance custom bidding algorithms without guesswork, AST syntax errors, or platform rejections.

DV360 BidKit Documentation ​

DV360 Custom Bidding DSL Linter, Pre-Flight Simulator, and Rule Compiler

dv360-bidkit provides an open-source MIT-licensed toolkit for engineering, validating, and compiling Google Display & Video 360 (DV360) custom bidding algorithms.


Architecture: Open-Core vs. Pro ​

dv360-bidkit follows an open-core architecture where the fundamental compiler, grammar validator, and local AST execution engine are open-source, while algorithmic calibration and funnel optimization are commercial:

mermaid
flowchart TD
    subgraph OpenCore["dv360-bidkit (Open-Source Core β€” MIT)"]
        A[DV360 DSL Grammar & Signal Registry]
        B[AST Linter & Deprecation Checker]
        C[Safe AST Interpreter & Simulator]
        D[RuleSet Compiler & Simplifier]
        E[Report Loader & Preamble/Footer Stripper]
        F[Customer Inventory Policy Normalizer]
    end

    subgraph ProExtension["dv360-bidkit-pro (Commercial Extension)"]
        G[Empirical Bayes Viewability Shrinkage Calibration]
        H[Client Funnel Screening & Mass-Balanced Weighting]
        I[Automated Ternary Outlier Capping]
        J[Impression-Weighted Rule Quantization]
        K[Multi-Objective Pareto Frontier Scenarios]
        L[Turnkey Production Bundle Exporter]
    end

    E --> C
    D --> B
    B --> C
    G --> H
    H --> J
    J --> D
    F --> D
    D --> L

DV360 BidKit Pro Commercial License

Supercharge your custom bidding workflows with automated Empirical Bayes Active View calibration, multi-objective funnel mass balancing (bidkit-pro weights), ternary outlier capping, and complete campaign bundle export.

πŸ‘‰ Get DV360 BidKit Pro License


Commercial Value Analysis: €100,000 Monthly Spend Scenario ​

Dimension / MetricPlain DV360 (Standard Bidding)Open-Core (dv360-bidkit)Enterprise Pro (dv360-bidkit-pro)
AST Linter & Platform RejectionsN/A (Standard DV360 CPA/CPC)0h turnaround (catches syntax & type errors locally)0h turnaround (validated before artifact packaging)
Script Engineering & QA Time10–15 hours manual Python scripting per campaign2–3 hours (automated compilation & local simulation)< 30 minutes (end-to-end automated pipeline & CLI)
Outlier & Pacing Starvation RiskHigh risk (max/median>20Γ— destabilizes pacing Ξ±t)Manual inspection required via diagnostic JSONAutomated 95th-percentile ternary capping eliminates starvation
Small-Sample Tail Noise WasteUnprotected (long-tail domains get maximum bid weights)Manual domain exclusions via policy.csvEmpirical Bayes shrinkage (Ξ»i) prevents ~€4k–€8k tail overspend
Multi-Objective Funnel OptimizationSingle Floodlight conversion event onlyManual proxy weights (risk of proxy domination)Econometric mass balancing preserves 65% conversion mass
Pre-Flight Simulation & SafetyNone (upload and wait for Google's model to train)Deterministic AST simulation against historical CSVsTurnkey 8-artifact campaign bundle with HTML audit report
Modeled Media Efficiency UpliftBaseline (€100k gross media spend)~€3,000 – €5,000 in avoided misconfigurations + engineering time saved~€15,000 – €25,000 modeled value uplift (reduced tail waste + balanced pacing)

Illustrative Scenario Model & Methodology Disclaimer

Media efficiency projections (~€15k–€25k) represent a modeled statistical counterfactual on a €100,000/month display/video campaign exhibiting typical publisher-tail noise and multi-step conversion funnels. Actual media uplift depends on campaign targeting, bid floors, inventory composition, and baseline conversion rates. Guaranteed software capabilities are strictly engineering and computational: 100% adherence to Google's 2026.1 AST specification, zero platform rejection turnaround delay, deterministic local evaluation without eval(), and reproducible mathematical shrinkage.


Signal Registry Reference (Google 2026.1 Specification) ​

Signal / FunctionKindReturn TypeGoogle Spec ReferenceStatusNotes
first_match_aggregateAggregationfloatS1VerifiedSequential evaluation returning first matched criteria weight
sum_aggregateAggregationfloatS1VerifiedSums matched condition weights
max_aggregateAggregationfloatS1VerifiedReturns highest matched weight
total_conversion_countFunctionfloatS1VerifiedCount of conversions for Floodlight activity ID and model ID (0=last touch)
total_conversion_valueFunctionfloatS1VerifiedMonetary revenue value for Floodlight sales activity
total_conversion_quantityFunctionfloatS1VerifiedTotal transaction item quantity for Floodlight activity
conversion_custom_variableFunctionstrS1VerifiedValue of Floodlight custom variable (u_variable_index)
ga4_conversions_countFunctionintS1VerifiedCount of GA4 events for property_id and conversion_event_name
domainDimensionstrS1VerifiedNormalized domain hostname (app bundle ID on Connected TV)
site_idDimensionintS1VerifiedDV360 site identifier
device_typeDimensionintS1Verified1=Desktop, 2=Smartphone, 3=Tablet, 4=Connected TV
environmentDimensionintS1Verified1=Web, 2=App
country_codeDimensionstrS1VerifiedISO 3166-1 alpha-2 country code
line_item_idDimensionintS1VerifiedDV360 Line Item ID
advertiser_idDimensionintS1VerifiedDV360 Advertiser ID
browser_idDimensionintS1DeprecatedRemoved from recent DV360 API releases

Google S2 Pre-Flight Training Readiness Standards ​

DV360 models require sufficient positive score historical density over the relevant lookback window (typically 30 days):

  • Advertiser minimum: β‰₯500 positively scored impressions across the advertiser.
  • Line item minimum: β‰₯50 positively scored impressions per active line item.
  • Score Distribution Health:
    • Positive Scoring Rate: 5%Β toΒ 40% (lower risks cold-start starvation; higher risks uninformative bidding).
    • Max-to-Median Score Ratio (max/median): ≀20.0Γ— (higher destabilizes DSP daily pacing controllers).
    • Gini Inequality: 0.25Β toΒ 0.65 (reflects clear publisher tiering without extreme winner-takes-all distortion).

Command Reference ​

dv360-bidkit (Core) ​

  • bidkit demo [--out-dir <dir>]: Generate synthetic demo fixtures and run an instant pre-flight diagnostic simulation.
  • bidkit lint <script.py> [--format text|json]: Validate script syntax against AST rules and the 2026.1 signal registry.
  • bidkit compile --rules <rules.json> [--policy <policy.csv>] [--out <script.py>]: Compile structured rules into production DSL.
  • bidkit evaluate <script.py> --report <report.csv> --mapping <mapping.json> [--out <diagnostics.json>]: Simulate script performance on historical data.
  • bidkit report <diagnostics.json> [--out <audit.html>]: Render visual HTML audit report.

dv360-bidkit-pro (Pro) ​

  • bidkit-pro auth [--key <key>]: Authenticate commercial license with Polar.sh.
  • bidkit-pro weights --report <report.csv> --mapping <mapping.json> --macro "<col>" --proxies "<col1,col2>" [--out <weights.json>]: Screen proxies and compute mass-balanced weights.
  • bidkit-pro build --report <report.csv> --mapping <mapping.json> --config <campaign.json> [--weights <weights.json>] [--policy <policy.csv>] [--out-dir <bundle_dir>]: Export turnkey 8-artifact production bundle.

DV360 BidKit Pro Installation & Authentication ​

  1. Obtain License & Download Wheel Bundle: Purchase on Polar.sh and download dv360-bidkit-pro-0.1.0-all-wheels.zip.
  2. Install Platform Binary:
    bash
    unzip dv360-bidkit-pro-0.1.0-all-wheels.zip
    pip install --find-links . dv360-bidkit-pro
  3. Authenticate License:
    bash
    bidkit-pro auth --key BK_PRO_...

Released under the MIT License.