Link Search Menu Expand Document

PDF

JavaScript Tag


You can implement the cookie-based opt-out mechanism through a JavaScript tag, which returns a JSONP-style response.

Sample JavaScript opt-out call

<script src="http://d.example.com/privacy/optout?callback=processOptOutResponse">

Where:

  • http: The protocol. If your website uses SSL/TLS, replace http with https.
  • d.example.com: The hostname of your OpenX delivery server.
  • ?: Separates the opt-out URL from the parameters.
  • callback: A required parameter, which indicates the JavaScript function wrapper to return in the JSONP response.

OpenX provides a JSONP response based on the success or failure of the opt-out process:

  • Opt-out successful: processOptOutResponse({"optout":"success"});
  • Opt-out fails: processOptOutResponse({"optout":"failure"});