Support for returning ad code