The
generateAdCode
request in the AdSense for Content service takes an optional
parameter called alternateColor
. An ad code may display a
public service announcement (PSA) for something such as a non-profit organization; an ad code from the sandbox will always generate a PSA.
If the ad code has the alternateColor
parameter set, it will display a
block of this color on the page where the PSA would appear. This is oftentimes the same as the background color of the page. As a result, some developers
report that the ad code from the sandbox is not working and no ads are
displayed, whereas in fact the ad code is there, just not visible. For testing in the sandbox, we recommend not specifying the alternateColor
parameter, which will result in PSAs always being visible.