Events

Commands are used to comunicate with the popup via javascript.

circle-info

To use the Web SDK please install the snippet first.

Commands will only work after popup is initialized (there is a callback for when it is initialized). For example:

getComplied.callback.oninit = function(data){
	getComplied.command('show');
}

Command

Description

Values

getComplied.command('show', {hideClose: false, asNew: false})

Opens Modal

hideClose (when enabled, close button is hidden) asNew (when enabled, updates consents as a new user, generating a new id and overriding the current session)

getComplied.command('change-lang', 'pt-PT')

Changes popup and inputs language

language code ("en-GB", "pt-PT"...)

getComplied.command('change-view', 'id', 119)

Opens a specific resource by ID Terms & Conditionsarrow-up-right

int

getComplied.command('change-view', 'index', 1)

Opens a specific resource by Index

Open in the 2nd Policyarrow-up-right

int

getComplied.command('change-view', 'static', 'languages')

Opens a specific static view Open Languages viewarrow-up-right

home languages contactdpo thirdparties cookies edit accessdata movedata beforgotten

getComplied.command('user', { Name: 'Firstname Lastname', Email: '[email protected]', Birthdate: { Day: 1, Month: 1, Year: 1990 }, CallingCode: { Code: '+351' }, Country: { Code: 'PT' }, Gender: 0, // 0 - Male, 1 - Female, 2 - Other Address1: 'Address Line 1', Address2: 'Address Line 2', City: 'CityName', ZipCode: '0000-000', PhoneNumber: '910 000 000', BusinessEmail: '[email protected]', CustomId: 'YOUR-CUSTOM-ID', });

Passes user information to GetComplied

Name Email Birthdate { Day, Month, Year } CallingCode { Code ("+1", "+1-242", "+351" ...) } Country { Code ("US", "PT", "GB" ...) } Gender ( 0 - Male, 1 - Female, 2 - Other ) Address1 Address2 City ZipCode PhoneNumber BusinessEmail CustomId (string, max-length 256)

Last updated

Was this helpful?