Skip to content

Configuration Options

The following documentation describes all of the possible options which can be passed to GLJ.init or set on the element as an attribute.

Initialization Configuration and Override Options

Init OptionForm Override AttributeTypeRequiredPossible ValuesDescription
glj-placementStringDefaults to defaultA name to give the form rendered in the specific element.
baseUrlStringRequiredThe base URL of the GetLinked server domain for your GetLinked instance.
selectorCSS SelectorRequiredThe CSS selectors of the elements currently on your page which should be replaced with an instance of the form.
localeStringDefaults to enar, da, de, el,
en, es, fi, he,
is, it, ja, ko,
lb, ms, nl, no,
pt, sv
The locale which any text on the form should use.
offerNameStringDefaults to page titleThe name of the offer to be reported to GetLinked
offerWebsiteStringDefaults to the value of window.location.hrefThe website of the offer to be reported to GetLinked
offerHashStringRequiredThe default offer hash used for accepting registrations
breakpointglj-breakpointNumberDefaults to 600Width at which a form will change number of fields in a row.
When less than the width of the form is less than the breakpoint, any rows with 2 fields will be split into 2 rows with 1 field per row.
classPrefixStringDefaults to elementorThe prefix to prepend to all relevant component classes.
inputSizeglj-input-sizeStringDefaults to smxs, sm, md, lg and xlDefines the size of the form field components.
inputLabelglj-input-labelBooleanDefaults to trueJS: true, false
HTML: 1, 0
Controls whether field labels should be rendered above the field.
fnameFieldCellsglj-fname-field-cellsNumberDefaults to 11, 2Controls how many cells out of 2 in a row should the fname field inhabit.
lnameFieldCellsglj-lname-field-cellsNumberDefaults to 11, 2Controls how many cells out of 2 in a row should the lname field inhabit.
emailFieldCellsglj-email-field-cellsNumberDefaults to 21, 2Controls how many cells out of 2 in a row should the email field inhabit.
phoneFieldCellsglj-phone-field-cellsNumberDefaults to 21, 2Controls how many cells out of 2 in a row should the phone field inhabit.
phoneForceMobileBooleanDefaults to falsetrue, falseControls whether phone number validation will reject numbers which cannot be mobile numbers.
countryFieldCellsglj-country-field-cellsNumberDefaults to -1-1, 1, 2Controls how many cells out of 2 in a row should the country field inhabit.
A value of -1 means that the country field will be rendered as part of the phone field.
passwordFieldCellsglj-password-field-cellsNumberDefaults to 00, 1, 2Controls how many cells out of 2 in a row should the password field inhabit.
A value of 0 will prevent the field from being shown.
showGeneratedPasswordBeforeRedirectBooleanDefaults to falsetrue, falseControls whether the password is shown in a dialog to the lead before redirection when passwordFieldCells = 0.
confirmPasswordFieldCellsglj-confirm-password-field-cellsNumberDefaults to 00, 1, 2Controls how many cells out of 2 in a row should the confirmPassword field inhabit.
A value of 0 will prevent the field from being shown.
tosFieldCellsglj-tos-field-cellsNumberDefaults to 20, 2Controls how many cells out of 2 in a row should the tos field inhabit.
A value of 0 will prevent the field from being shown.
tosDocLocationStringWhen tosMustBeRead = trueThe URL from which the Terms of Service can be accessed. For best results, this should be a markdown document.
tosMustBeReadBooleanDefaults to truetrue, falseControls whether the applicant will be shown a copy of the Terms of Service before being allowed to accept that they agree to the Terms of Service.
privacyFieldCellsglj-privacy-field-cellsNumberDefaults to 00, 2Controls how many cells out of 2 in a row should the privacy field inhabit.
A value of 0 will prevent the field from being shown.
privacyDocLocationStringWhen privacyMustBeRead = trueThe URL from which the Privacy Policy can be accessed. For best results, this should be a markdown document.
privacyMustBeReadBooleanDefaults to falsetrue, falseControls whether the applicant will be shown a copy of the Privacy Policy before being allowed to accept that they agree to the Terms of Service.
recaptchaSiteKeyStringOptionalThe Google ReCaptcha V3 Site Key used to ensure that submissions made are not from bots or other undesirable traffic.
callToActionglj-call-to-actionStringDefaults to callToAction.defaultThe text or i18n text key to be shown on the button which submits the form.
disclaimerglj-disclaimerStringDefaults to legal.disclaimer.defaultThe text or i18n text key to be shown as the form disclaimer.
localStorageEncodingTypeStringDefaults to aesbase64, aes, des, rabbit, rc4, ""The method used to encode the data stored in the local storage.
See the secure-ls documentation for more information.
localStorageCompressionBooleanDefaults to truetrue, falseIf the data in the local storage should be compressed / minified.
See the secure-ls documentation for more information.
localStorageSecretStringDefaults to the value of window.location.originThe secret used for encrypting and decrypting values in the local storage.
See the secure-ls documentation for more information.
localStorageNamespaceStringDefaults to gljThe secure-ls namespace to be used, ensuring that values do not pollute other instances of secure-ls in use on the page.
See the secure-ls documentation for more information.
useMaxmindGeoIpBooleanDefaults to falsetrue, falseControls if the MaxMind GeoIP Javascript SDK should be loaded and used for determining the IP and Country of the visitor.
Should be disabled if a paid MaxMind Account has not been configured for the domain which is hosting the page.
sweetAlertOptionsObjectSee child optionsOptions for customization of the feedback modals shown to the visitor.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.backdropBoolean or StringWhether or not SweetAlert2 should show a full screen click-to-dismiss backdrop.
Can be either a Boolean or a String which will be assigned to the CSS background property.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.toastBooleanDefaults to falsetrue, falseWhether or not an alert should be treated as a toast notification.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.positionStringDefaults to top-end when sweetAlertOptions.toast = true
Forbidden when sweetAlertOptions.toast = false
top, top-start, top-end,
center, center-start, center-end,
bottom, bottom-start, bottom-end
The position of the toast.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.widthString or NumberPopup window width, including paddings (box-sizing: border-box).
Can be in any CSS unit (px, em/rem, %).
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.paddingString or NumberPopup window padding.
Can be in any CSS unit (px, em/rem, %).
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.colorStringText color for title, content and footer.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.backgroundStringPopup window background color.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.animationBooleantrue, falseWhether to animate the popup.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.buttonsStylingBooleantrue, falseWhether to apply default styling to buttons.
See the SweetAlert2 configuration documentation for more information.
sweetAlertOptions.reverseButtonsBooleantrue, falseWhether to reverse the default button order.
See the SweetAlert2 configuration documentation for more information.
onErrorFunctionCallback which is triggered when an error is encountered.
See Arguments passed to the onError callback for more information.
onSubmitFunctionCallback which is triggered when the submit button is pressed.
See Arguments passed to the onSubmit callback for more information.
onAfterSubmitFunctionCallback which is triggered after the submission is sent to the API and the response is returned.
See Arguments passed to the onAfterSubmit callback for more information.
onSuccessFunctionCallback which is triggered when a successful registration has occured.
See Arguments passed to the onSuccess callback for more information.
onFailureFunctionCallback which is triggered when an attempted registration fails.
See Arguments passed to the onFailure callback for more information.
delayBeforeRedirectNumber?The amount of time in miliseconds to wait before

Arguments passed to the onError callback

ArgumentTypeDescription
errorErrorThe error which was encountered
placementStringThe placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form.

Arguments passed to the onSubmit callback

ArgumentTypeDescription
payloadObjectThe payload which was submitted.
payload.clickIDStringThe click ID associated with the submission.
payload.customStringCustom data field.
payload.custom1StringCustom data field.
payload.custom2StringCustom data field.
payload.custom3StringCustom data field.
payload.custom4StringCustom data field.
payload.custom5StringCustom data field.
payload.autoSignupStringInternal GetLinked flag.
payload.isTestStringInternal GetLinked flag.
payload.bidStringInternal GetLinked flag.
payload.baaStringInternal GetLinked flag.
payload.ipStringIP address associated with the submission.
payload.localeStringLocale of the submission.
payload.offerNameStringName of the offer associated with the submission.
payload.offerWebsiteStringWebsite of the offer associated with the submission.
payload.offerHashStringHash of the offer associated with the submission.
payload.commentStringComment associated with the submission.
payload.firstNameStringFirst name of the submission.
payload.lastNameStringLast name of the submission.
payload.emailStringEmail of the submission.
payload.passwordStringPassword of the submission.
payload.areaCodeStringCountry code of the submission.
payload.phoneStringPhone number of the submission.
payload.platformsArray<String>Internal GetLinked flag.
payload.excludePlatformsArray<String>Excluded Internal GetLinked flag.
payload.captchaStringInternal GetLinked flag.
payload.captchaHashStringInternal GetLinked flag.
payload.customFieldsArray<Object>Internal GetLinked flag.
placementStringThe placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form.

Arguments passed to the onAfterSubmit callback

ArgumentTypeDescription
payloadObjectThe payload which was submitted.
payload.clickIDStringThe click ID associated with the submission.
payload.customStringCustom data field.
payload.custom1StringCustom data field.
payload.custom2StringCustom data field.
payload.custom3StringCustom data field.
payload.custom4StringCustom data field.
payload.custom5StringCustom data field.
payload.autoSignupStringInternal GetLinked flag.
payload.isTestStringInternal GetLinked flag.
payload.bidStringInternal GetLinked flag.
payload.baaStringInternal GetLinked flag.
payload.ipStringIP address associated with the submission.
payload.localeStringLocale of the submission.
payload.offerNameStringName of the offer associated with the submission.
payload.offerWebsiteStringWebsite of the offer associated with the submission.
payload.offerHashStringHash of the offer associated with the submission.
payload.commentStringComment associated with the submission.
payload.firstNameStringFirst name of the submission.
payload.lastNameStringLast name of the submission.
payload.emailStringEmail of the submission.
payload.passwordStringPassword of the submission.
payload.areaCodeStringCountry code of the submission.
payload.phoneStringPhone number of the submission.
payload.platformsArray<String>Internal GetLinked flag.
payload.excludePlatformsArray<String>Excluded Internal GetLinked flag.
payload.captchaStringInternal GetLinked flag.
payload.captchaHashStringInternal GetLinked flag.
payload.customFieldsArray<Object>Internal GetLinked flag.
responseObjectThe response received after the submission.
response.dataObject?Data object containing details about the submission response.
response.data.signupRequestIDString?The ID associated with the signup request, if available.
response.data.projectObject?Details about the project, if available.
response.data.project.afterSignupModalURLString?URL for the modal to be shown after signup, if available.
response.data.project.detailsObject?Additional details about the project, if available.
response.data.project.details.captchaAttemptsNumber?Number of captcha attempts made, if available.
response.data.brokerObject?Details about the broker, if available.
response.data.broker.nameString?Name of the broker, if available.
response.data.broker.logoString?URL of the broker's logo, if available.
response.data.captchaObject?Details about the captcha, if available.
response.data.captcha.countNumber?Count of captcha, if available.
response.messagesArray<String>Array of messages associated with the submission response.
response.errorObject?Error object, if the response is an error.
response.error.codeNumber?Error code, if available.
response.error.messageString?Error message, if available.
placementStringThe placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form.

Arguments passed to the onSuccess callback

ArgumentTypeDescription
payloadObjectThe payload which was submitted.
payload.clickIDStringThe click ID associated with the submission.
payload.customStringCustom data field.
payload.custom1StringCustom data field.
payload.custom2StringCustom data field.
payload.custom3StringCustom data field.
payload.custom4StringCustom data field.
payload.custom5StringCustom data field.
payload.autoSignupStringInternal GetLinked flag.
payload.isTestStringInternal GetLinked flag.
payload.bidStringInternal GetLinked flag.
payload.baaStringInternal GetLinked flag.
payload.ipStringIP address associated with the submission.
payload.localeStringLocale of the submission.
payload.offerNameStringName of the offer associated with the submission.
payload.offerWebsiteStringWebsite of the offer associated with the submission.
payload.offerHashStringHash of the offer associated with the submission.
payload.commentStringComment associated with the submission.
payload.firstNameStringFirst name of the submission.
payload.lastNameStringLast name of the submission.
payload.emailStringEmail of the submission.
payload.passwordStringPassword of the submission.
payload.areaCodeStringCountry code of the submission.
payload.phoneStringPhone number of the submission.
payload.platformsArray<String>Internal GetLinked flag.
payload.excludePlatformsArray<String>Excluded Internal GetLinked flag.
payload.captchaStringInternal GetLinked flag.
payload.captchaHashStringInternal GetLinked flag.
payload.customFieldsArray<Object>Internal GetLinked flag.
responseObjectThe success response received after the submission.
response.dataObject?Data object containing details about the success response.
response.data.signupRequestIDString?The ID associated with the signup request, if available.
response.data.projectObject?Details about the project, if available.
response.data.project.afterSignupModalURLString?URL for the modal to be shown after signup, if available.
response.data.project.detailsObject?Additional details about the project, if available.
response.data.project.details.captchaAttemptsNumber?Number of captcha attempts made, if available.
response.data.brokerObject?Details about the broker, if available.
response.data.broker.nameString?Name of the broker, if available.
response.data.broker.logoString?URL of the broker's logo, if available.
response.data.captchaObject?Details about the captcha, if available.
response.data.captcha.countNumber?Count of captcha, if available.
response.messagesArray<String>Array of messages associated with the submission response.
placementStringThe placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form.

Arguments passed to the onFailure callback

ArgumentTypeDescription
payloadObjectThe payload which was submitted.
payload.clickIDStringThe click ID associated with the submission.
payload.customStringCustom data field.
payload.custom1StringCustom data field.
payload.custom2StringCustom data field.
payload.custom3StringCustom data field.
payload.custom4StringCustom data field.
payload.custom5StringCustom data field.
payload.autoSignupStringInternal GetLinked flag.
payload.isTestStringInternal GetLinked flag.
payload.bidStringInternal GetLinked flag.
payload.baaStringInternal GetLinked flag.
payload.ipStringIP address associated with the submission.
payload.localeStringLocale of the submission.
payload.offerNameStringName of the offer associated with the submission.
payload.offerWebsiteStringWebsite of the offer associated with the submission.
payload.offerHashStringHash of the offer associated with the submission.
payload.commentStringComment associated with the submission.
payload.firstNameStringFirst name of the submission.
payload.lastNameStringLast name of the submission.
payload.emailStringEmail of the submission.
payload.passwordStringPassword of the submission.
payload.areaCodeStringCountry code of the submission.
payload.phoneStringPhone number of the submission.
payload.platformsArray<String>Internal GetLinked flag.
payload.excludePlatformsArray<String>Excluded Internal GetLinked flag.
payload.captchaStringInternal GetLinked flag.
payload.captchaHashStringInternal GetLinked flag.
payload.customFieldsArray<Object>Internal GetLinked flag.
responseObjectThe error response received after the submission.
response.errorObject?Error object containing details about the failure, if available.
response.error.codeNumber?Error code, if available.
response.error.messageString?Error message, if available.
response.messagesArray<String>Array of messages associated with the submission failure.
placementStringThe placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form.