Events
Commands are used to comunicate with the popup via javascript.
Last updated
Commands are used to comunicate with the popup via javascript.
Last updated
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:
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
int
getComplied.command('change-view', 'index', 1)
Opens a specific resource by Index
int
getComplied.command('change-view', 'static', 'languages')
Opens a specific static view
home languages contactdpo thirdparties cookies edit accessdata movedata beforgotten
getComplied.command('user', {
Name: 'Firstname Lastname',
Email: 'user@email.com',
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: 'user@company.com',
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)