setLogo

Funtionality

The function setLogo is used to set a custom logo that is used in the GDPR user interface to have a publisher specific branding.

Syntax

function adconsent.gdpr()

argument name

type

optional

value

description

argument name

type

optional

value

description

command

string

 

'setLogo'

 

parameter

string

 

e.g. 'https://mysite.com/path/to/my/logo.jpg'

Logo URL path.

callback

function

✔️

function(result:boolean, success:boolean)

The callback function that is called with the function call result.

Description

The user interface for GDPR shows up a popup or a banner which takes most of the space in the publisher page. In order to better integrate it with the existing content and drive the user into a better opt-in rate, providing the site logo to be shown in the popup or banner is recommended.

This is how it shows without a logo:

This is how it shows up with a logo:

Image format

The recommended logo image format is png, jpeg or svg, with a size of 270x120 pixels. Other sizes might fit as well, but should to be validated.

Scope

The function must be called before AdConsent shows the GUI. Calls after AdConsent has shown the GUI will be ignored.

Example

Setting a logo located at 'https://mysite.com/logo.png'

adconsent.gdpr('setLogo', 'https://mysite.com/logo.png');