Prebid.js Consent Management: Publishers के लिए Header Bidding Setup Guide

Header bidding publishers के CPM को बढ़ाता है क्योंकि यह demand partners को parallel में प्रतिस्पर्धा करने देता है — लेकिन उन partners में से प्रत्येक को cookie डालने, fingerprint लेने, या pixel fire करने से पहले एक valid consent signal की जरूरत होती है। Prebid.js, de facto open-source header bidding wrapper जो दसियों हजार sites द्वारा उपयोग किया जाता है, एक Consent Management module के साथ आता है जो आपके CMP को हर auction से जोड़ता है। गलत configure करने पर आप या तो बिना consent के data leak करते हैं (regulatory risk) या bidders को जरूरी signal से वंचित करते हैं (revenue risk)। यह guide publishers को production-grade setup के माध्यम से walk करती है।

Prebid.js को Consent Management Module की जरूरत क्यों है

जब Prebid.js auction चलती है, तो wrapper हर configured bidder adapter को parallel requests भेजता है। प्रत्येक adapter को अपने bid request में user की consent string शामिल करनी होगी — tcfeu (EU/UK के लिए TCF v2.2), usp (CCPA/CPRA), और तेजी से gpp (IAB Global Privacy Platform string जो multiple US states को cover करती है)। इन signals के बिना, downstream SSPs और DSPs को या तो user को opted-out मानने, bid पूरी तरह छोड़ने, या — सबसे बुरे मामले में — data को गैरकानूनी तरीके से process करने पर मजबूर होना पड़ता है।

Prebid Consent Management module आपके CMP और bid request pipeline के बीच बैठता है। यह standard CMP API (__tcfapi, __uspapi, __gppapi) को call करता है, consent string का इंतजार करता है, और फिर इसे automatically हर adapter के bid request payload में inject कर देता है। यह purpose-based gating को भी enforce करता है जब आप GDPR enforcement enable करते हैं, उन users के लिए storage access और bidder execution को block करते हुए जिन्होंने relevant TCF purposes नहीं दिए हैं।

Core Module को Install और Configure करना

Prebid.js को per-publisher docs.prebid.org/download.html से build किया जाता है। जब आप अपना custom build generate करते हैं, तो "Consent Management" के अंतर्गत तीन modules मायने रखते हैं:

अगर आप global traffic serve करते हैं तो तीनों शामिल करें। एक बार जब build आपके CDN पर आ जाए, तो अपने Prebid setup script में modules को configure करें:

TCF v2.2 configuration

TCF block Prebid को बताता है कि कौन सा CMP API call करना है, string के लिए कितना इंतजार करना है, और timeout पर क्या करना है। एक typical production config cmpApi: 'iab', timeout: 8000 (8 seconds — slow CMP banner load के लिए काफी लंबा), और defaultGdprScope: true set करती है ताकि unknown jurisdictions में users को तब तक in-scope माना जाए जब तक अन्यथा prove न हो। actionTimeout को अलग से set करना यह control करता है कि जब user ने banner के साथ interact नहीं किया हो तो Prebid कितना इंतजार करता है — इसे reasonable रखना blank ad slot से बचाता है अगर visitor banner को ignore करे।

US Privacy और GPP

USP simple है: module enable करें और Prebid __uspapi से four-character string पढ़ता है। GPP अधिक nuanced है क्योंकि GPP string multiple section IDs (TCF EU, US National, US California, US Colorado, US Virginia आदि) carry कर सकती है। Prebid full string को automatically forward करता है, लेकिन bidders specific sections inspect करते हैं। सुनिश्चित करें कि आपका CMP प्रत्येक user की jurisdiction के लिए correct GPP sections emit करता है — एक misconfigured CMP जो California user को केवल US National section emit करता है, CPRA-compliant DSPs को bid discard करने पर मजबूर करेगा।

GDPR Enforcement Enable करना (Purpose-Based Gating)

Default रूप से, consent module TCF string pass करता है लेकिन कुछ भी block नहीं करता। Prebid को वास्तव में TCF purposes enforce करने के लिए, gdprEnforcement rule set enable करें। यहीं पर अधिकांश setup mistakes होती हैं — और यहीं compliant और non-compliant header bidding stack के बीच का अंतर रहता है।

Standard ruleset चार activities को block करता है जब relevant purpose में consent की कमी हो:

प्रत्येक rule के लिए आप enforcePurpose: true, enforceVendor: true, और vendorExceptions की एक list set करते हैं। Vendor exception list critical है: आपके द्वारा वहां list किए गए किसी भी bidder को explicit TCF vendor consent के बिना भी participate करने की अनुमति है, इस आधार पर कि आपके पास अलग legal basis है (जैसे legitimate interest combined with a contractual flow)। इसे sparingly use करें — over-broad exceptions exactly वह pattern है जिसके लिए regulators ने publishers को fine करना शुरू किया है।

Common Pitfalls जो Publishers को Revenue या Compliance में Cost करते हैं

Timeout बहुत कम set किया गया

अगर timeout आपके CMP के banner render time से कम है, तो Prebid बिना consent string के आगे बढ़ जाता है। Bidders इसे no-consent मानते हैं और bid छोड़ देते हैं। अपने CMP के tcfapi('addEventListener') first-call latency को 95th percentile पर measure करें और Prebid timeout को उसके ऊपर set करें। 8000 ms एक safe default है; 3000 ms risky है अगर आप उन markets serve करते हैं जहां banners को localize होने में समय लगता है।

US traffic पर missing GPP integration

Major SSPs और DSPs (Google AdX, TTD, Magnite, PubMatic) अब US opt-out enforcement के लिए GPP string की जरूरत रखते हैं। अगर आप केवल legacy USP string emit करते हैं, तो ये DSPs आपकी inventory को downgrade या skip करना शुरू कर देंगे। अपने bid responses audit करें: 2026 में US traffic पर sharp CPM drop अक्सर missing-GPP signal होता है।

SPA navigation पर stale consent strings

Single-page apps जो route changes पर Prebid auctions re-trigger करते हैं उन्हें pbjs.refreshUserIds() call करना होगा और सुनिश्चित करना होगा कि latest TCF string fetch की गई है। 30-minute-old cached string पिछले user की preferences carry कर सकती है अगर आपकी site shared sessions use करती है।

Analytics के लिए missing vendorExceptions

Publishers अक्सर भूल जाते हैं कि Prebid Analytics adapters (Google Analytics, server-side reporting) भी TCF Purpose 7 के तहत measurement gating के अधीन हैं। अगर आप revenue reporting के लिए इन पर निर्भर हैं, तो उन्हें measurement rule के vendor exceptions के तहत explicitly list करें या no-consent traffic पर data gap accept करें।

Production से पहले अपना Setup Test करना

Prebid.js browser console में pbjs.getConfig('consentManagement') expose करता है। Verify करें कि active configuration आपके intent से match करता है। फिर Chrome Prebid.js Professor extension या pbjs.getEvents() use करके प्रत्येक bid request से attached consent string inspect करें। तीन scenarios spot-check करें: एक fully consented user, एक user जिसने "Reject All" click किया, और एक user जिसने banner को interact किए बिना dismiss किया। प्रत्येक को bid request payload में अलग observable behavior produce करनी चाहिए।

VPN या अपने CMP के geolocation override flag का उपयोग करके geographies में same checks run करें। EU traffic को TCF string produce करनी चाहिए और gdprEnforcement trigger करना चाहिए; California traffic को USP और GPP string produce करनी चाहिए; jurisdictionally-unknown traffic को आपकी defaultGdprScope setting respect करनी चाहिए।

सब कुछ एक साथ

सही तरीके से configured Prebid Consent Management stack एक साथ तीन काम करती है: यह आपके bidders को valid consent signals (CPMs preserve करते हुए) से supplied रखती है, TCF और US opt-out rules को wrapper level पर enforce करती है (regulatory exposure कम करते हुए), और आपको एक single audit point देती है जब कोई regulator पूछे कि आपका header bidding setup user choice को कैसे honor करता है। Timeouts को deliberately set करने में समय लगाएं, US traffic के लिए GPP को USP के साथ enable करें, और अपनी vendorExceptions list quarterly review करें — इसे गलत करने की cost fines और lost programmatic revenue दोनों में measured होती है।

← ब्लaderegistrdelays delays सभी पढ़ें →