Serving Prebid into SafeFrames

Last Updated February 15, 2019

The SafeFrame 1.0 spec came into existence in 2014, as a way for publishers to serve interactive ads that were both full-featured, and also protective of the user’s sensitive information. The SafeFrame 1.0 spec can prevent common issues among malicious creatives that degrade the user’s experiences and offer support for viewability, which is an increasingly prevalent metric within AdTech.

Despite the many benefits of SafeFrames, it has been hard for publishers to integrate them into their ad stack, as it is difficult to make them compatible with traditional ad tags that 3rd party vendors (such as Sovrn) provide. In fact, we recommend that publishers do not serve our display (or “waterfall”) tags through SafeFrames.

When it comes to Prebid, there is one simple fix will allow you to serve ads through SafeFrames without too many complications. All that you need to do is swap out the code used in the creatives associated with the Prebid line items with the following snippet, which can be found at the end of this article, or by clicking here.

Please note, that this method of serving creatives may cause small effects on overall yield, as some creatives are simply not compatible with the SafeFrame technology. These posts intend to make header bidding through Prebid approachable for the everyday publisher.

How satisfied are you with this article?

  • Not at all satisfied
  • 1
  • 2
  • 3
  • 4
  • 5
  • Completely satisfied