Last updated on May 29, 2018
You can implement the cookie-based opt-out mechanism through an image tag. Typically, this is the simplest implementation.
For example, if you use the following opt-out image tag:
<img src="http://d.example.com/privacy/optout" />
OpenX then performs the previously-described steps and displays a success or failure image to indicate the result of the opt-out.
By default, if the opt-out is successful; that is, if OpenX is able to set the user opt-out cookie, then OpenX redirects and loads the image referenced in the following URL:
Alternatively, if the opt-out is not successful; that is, if OpenX is unable to set the user opt-out cookie (perhaps because the user does not accept cookies), then OpenX redirects and loads the image referenced in the following URL:
(Optional) Add parameters to the opt-out tag if you want OpenX to redirect to particular success or failure images.
- Add the
s=parameter with URL of the image to load if the opt-out is successful.
- Add the
f=parameter with the URL of the image to load if the opt-out is not successful.
For example, with these parameters your image tag may look like the following:
<img src="http://d.example.com/privacy/optout s=http://example.com/my_optout_success.gif& f=http://example.com/my_optout_failure.gif" />
When using more complex inputs to the
f= parameters, the values should be properly escaped or encoded.