AE JS Settings Reference Table Test

Updated 3 months ago ​by Annabel Youens

This article provides a reference of all the available AE JS settings. Settings can be configured via the settings property on the returned aeJS object.

For example, if you wanted to enable the auth_window setting, you could add this JavaScript:

aeJS.settings['auth_window'] = true;

All settings are optional and have default values.

Here is a list of all of the available settings for reference:

SettingTypeDescription
auth_windowBoolSetting that determines whether registration flow should happen within the same page via modal window pop-up, or as browser redirect. Default: false
close_buttonBoolDetermines whether to show a close/link button in top right corner of modal pop-up. Clicking off modal will still close window. Default: false
date_formatStringSets the order of the date fields in the extra fields forms. eg. Birthdate. Currently accepts 'MM-DD-YYYY' or ‘DD-MM-YYYY' (default).
display_error_messageBoolTurn on/off AE default flow error messaging. Default is true (on)
email_formatObjectObject which customizes the look of the any emails sent due to framework authentication flow. Eg. email verification or password reset. Available properties are:

background_color
font_size
font_family
font_color:
show_header
header_background_color
header_font_color
image_url
show_footer
footer_background_color
footer_font_color
logo_link
logo_img_url
copyright
reset_pw_email_subject
reset_pw_email_message
verify_email_subject
verify_email_message
reset_pw_email_link
verify_email_link


Default: null (uses framework defaults)
extra_fieldsObjectObject that defines any additional fields which should be captured as part of registration. Available fields that can be specified are:

firstname
surname
email
password
address
addressline2
city
state
country
postcode
homephone
mobilephone
username
website
bio
gender
birthdate


Each field allows for 4 additional and optional properties to be defined:

required (default false) required_message (framework default) error_message (framework default)
label (framework default)


Example:
aeJS.settings['extra_fields'] = {email: { label: 'enter email', required: true, 'required_message': "some message", 'error_message': "some error" },
 birthdate}

Note: Any labels or message values provided will override any language settings (see below). If field properties are not defined then fields are assumed optional and messages use multi-lingual system defaults. Default: null  
extra_fields_screenStringDetermines at what point in registration flow additional fields form should be presented to user.

Valid options are: ‘before’, ‘after’, ‘disabled’

Default: ‘disabled’
extra_infoObjectObject that specifies any additional information that should be injected into the authentication flow. Note: Can be handled through ae data tags instead.

Available steps for information insertion are:

global
login
register
required (extra fields) recover_password reset_password reset_password_ok verify_email
verify_email_ok


Each insertion can be positioned as ‘top’ or ‘bottom’.

Each insertion contains additional information consisting of a title and associated content.

Example:
aeJS.settings['extra_info'] = { global: { 'top': { 'text' : "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed justo risus, tristique at bibendum vitae, vulputate at nibh. Nam condimentum consequat pharetra. Mauris ex erat, pretium ut tincidunt ut, luctus at tellus.", 'title' :
'Global Top Title'}}

Default: null
flow_cssURLAbsolute url for custom css to be applied to registration flow. See CSS styling guide for further info on available selectors.

Default: null
flow_textObjectObject that specifies text overrides for headers, messages and buttons displayed during authentication flow.

Available overrides are:

error_header                      login_header
register_header add_info_header add_info_button reset_pw_header reset_pw_sent reset_pw_instructions reset_pw_button reset_pw_confirm_header reset_pw_confirm_button reset_pw_confirm_instructions reset_pw_done_header reset_pw_done_message reset_pw_done_button verify_email_header verify_email_sent verify_email_instructions verify_email_retry_button verify_email_success_header verify_email_success_message verify_email_success_button verify_email_error_header verify_email_error_message forgot_password_link recover_password_link have_account_link need_help_link create_account_link

Example:
aeJS.settings['flow_text'] = {   error_header : 'Sorry, there seems to be a problem',   login_header : 'Sign In',   register_header : 'Sign Up',   verify_email_retry_button : 'Retry',   
  need_help_link : 'need help?'
}
hide_email_formBoolSetting determines whether email registration/login option will be presented as an inline form or as a button that triggers display of form.

Form is shown within register-window, login window in both modal and redirect flows.

Default: false
languageStringLanguage code that specifies language to use for error messages during extra fields capture.

Use the code value for the associated language:

English - en_US (default) Albanian - sq_AL
Arabic - ar_MA
Basque - eu_ES
Belgium (French) - be_FR Belgium (Netherland) -be_NL Bulgarian - bg_BG
Catalan - ca_ES
Chilean Spanish - es_CL Chinese - zh_CN
Czech - cs_CZ
Danish - da_DK
Dutch (Netherland) - nl_NL Finnish - fi_FI
French - fr_FR
German - de_DE
Greek - gr_EL
Hebrew - he_IL
Hindi - hi_IN
Hungarian - hu_HU
Indonesian - id_ID
Italian - it_IT
Japanese - ja_JP
Norwegian - no_NO
Persian (Farsi) - fa_IR
Polish - pl_PL
Portuguese (Brazil) - pt_BR Portuguese (Portugal) - pt_PT Romanian - ro_RO
Russian - ru_RU
Serbian - sr_RS
Slovak - sk_SK
Spanish - es_ES
Swedish - sv_SE
Taiwanese - zh_TW
Thai - th_TH
Turkish - tr_TR
Ukrainian - ua_UA
Vietnamese - vi_VN

Default: en_US
no_emailBoolShows/hides email registration as an option in authentications flows triggered by ae-data-login-window or ae-data-register-window.

Default: false
minimum_ageIntEnables an age verification check. Note: birthdate must be specified as a required field. 

Default: null
mobile_detectBoolDetermines whether mobile detection will be handled natively by the framework. If a mobile device is detected then this will override the ‘auth_window’ setting and force browser redirect flow.

Note: There is a ‘onMobileDetect’ event available to perform custom action upon page load if required. This event will fire regardless of the ‘mobile_detect’ setting.


Default: true
optinsArrayArray of object settings that define each opt-in to be presented in the modal or redirect window for registration and login. Optins are shown as checkboxes prior to login/registration.

Object fields
label: name to show beside checbox brandid (optional): subscribe to a specific brand newsletter/group
Segmentid (optional): subscribe to specific segment newsletter/group.

If no brandid or segmentid is provided, the user is opting into a global newsletter/group for your account

Example:
aeJS.settings['optins'] = [
{ label: 'Universal Access', checked:true },
{ label: 'Nike', brandid: 123 },
{ label: 'Streaming News', segmentid: 123, checked: false },
];
partner_codeStringCode that identifies external system associated with any registration performed by local framework.
partner_idStringExternal user ID associated with any registration performed by local framework. Requires partner_code.

eg. the local CMS ID for a logged in user.
refresh_demographicsBoolDetermines whether the most recent social network demographics will override existing user data on login.
eg. Birthdate

Default: true
return_urlURLSpecifies global setting for any return urls. If not set then the return_url always defaults to the current url when a link or form is triggered with an AE data tag. This setting is always overridden by any data-ae-return attributes.

Default: null
scopesObjectObject that specifies a subset of service specific permissions that should be presented to a user during authentication. Must be a sub-set of permissions already available to the service application (eg. Facebook app permissions).

Example:
aeJS.settings['scopes'] = { facebook : 'email, user_actions.music',    
twitter : 'read',    
qq : 'get_user_info',    
weibo : 'email',    
deezer : 'basic_access',     spotify : 'playlist-read-private'
}
servicesString Comma separated list of services to offer for registration. Must be a subset of the full list of services configured via the Dashboard. Screens display services in order provided.

Services that can be specified in list:

facebook
twitter
youtube
google
instagram
tumblr
soundcloud
lastfm
foursquare
rdio
spotify
beatsmusic
deezer
napster
kakao
weibo
qq
none

A setting of ‘none’ means do not show any. In cases of custom development this setting will prevent registration on services not explicitly set. To allow all leave blank.

Example:

‘facebook, twitter’

Default: null (shows all)
social_firstBoolDisplay social icons before email signup/signin
ssoStringScope determines whether a user will be automatically signed-in or registered (if sessions available).

Valid options are:

application:
If a user previously registered on the domain, and a user session exists aeJS will fire an ‘onUser’ event.

If a user previously registered on the domain, and a user session does not exist, aeJS will fire an ‘onLogin’ event with a state of ‘login’ when the user signs in.

If user has not previously registered on the domain, it will attempt to automatically login the user if they previously signed in on any domain with the included framework. If successful an onLogin event will be fired with a state of ‘registration’ and the sso param as true.

In order to succeed, a user must meet the criteria of the current domains aeJS settings. i.e. they must have used a service enabled for the current site, provided all required fields, verified their email if required, etc.

If not, the user must explicitly register.

local:
If user previously registered on the domain, will fire an ‘onUser’ event.

If not, the user must explicitly register.

Default: ‘application’
verify_emailBoolSetting that determines whether registration flow should send confirmation email to verify an email address. Automated verification URL and screen provided.

Default: false
verify_email_for_loginBoolUser must have a verified email in order to trigger login for framework.


You can find out more information about each setting in the sections below.

Expects a boolean.

When false, this setting redirects users to a new page during for the AE Connect registration flow. When true, the registration flow occurs in a pop-up modal window.

The default value is false.

Expects a boolean.

This settings determines whether to show a close button or link in top-right corner of the modal pop-up. Clicking outside of the modal will still close window.

The default value is false.

Note that this setting requires that the auth_window setting uses modal pop-up windows. This is its default setting.

Expects a string: either MM-DD-YYYY or DD-MM-YYYY.

Sets the date format in date fields. This is used in conjunction with extra fields forms (the extra_fields setting). Date fields are generally used for birth dates.

The default value is DD-MM-YYYY.

Expects a boolean.

If true, AE Connect's default flow error messaging is turned on.

The default value is true.

Expects an object.

An object which customizes the look of the any emails sent due to framework authentication flow. For example, the email verification email or a password reset email.

The following properties are available:

  • background_color 
  • font_size 
  • font_family 
  • font_color 
  • show_header 
  • header_background_color 
  • header_font_color 
  • image_url 
  • show_footer 
  • footer_background_color 
  • footer_font_color 
  • logo_link 
  • logo_img_url 
  • copyright 
  • reset_pw_email_subject 
  • reset_pw_email_message 
  • verify_email_subject 
  • verify_email_message 
  • reset_pw_email_link 
  • verify_email_link 

The default value is null.

Expects an object.

An object that defines any additional fields that should be captured during registration. This setting requires that you also set the extra_fields_screen setting.

The following fields that can be specified:

  • firstname 
  • surname 
  • email 
  • password 
  • address 
  • addressline2 
  • city 
  • state 
  • country 
  • postcode 
  • homephone 
  • mobilephone 
  • username 
  • website 
  • bio 
  • gender 
  • birthdate 

Each field takes four optional properties:

  • required: Boolean. The default value is false.
  • required_message: String. Overrides AE JS's default message.
  • error_message: String. Overrides AE JS's default message.
  • label: String. Overrides AE JS's default label value.

Here's an example of how you could implement the extra_fieldssetting with a custom email field and a birthdate field with the defaults:

aeJS.settings['extra_fields'] = {
  email: {
    label: 'enter email',
    required: true,
    'required_message': "some message",
    'error_message': "some error"
  },
  birthdate
}

Note that any message or label values that you provide override your language setting.

The default value is null.

Expects a string: before, after, or disabled.

This setting determines at what point in the registration flow that the extra_fields form should be presented to user.

The default value is disabled.

Expects an object.

An object that specifies any additional information that should be injected into the authentication flow. Note that you can handle this via AE data tags instead.

The available steps for information insertion include the following:

  • global 
  • login 
  • register 
  • required  (for extra fields)
  • recover_password 
  • reset_password 
  • reset_password_ok 
  • verify_email 
  • verify_email_ok 

Each insertion can be positioned as either top or bottom.

Each insertion contains additional information consisting of a title and associated content. Here's an example:

aeJS.settings['extra_info'] = {
  global: {
  'top': {
    'text' : "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed justo risus, tristique at bibendum vitae, vulputate at nibh. Nam condimentum consequat pharetra. Mauris ex erat, pretium ut tincidunt ut, luctus at tellus.",
    'title' : 'Global Top Title'
  }
}

The default value is null.

Expects a URL.

An absolute URL to a CSS file that should be applied to the registration flow. See our CSS styling guide for further information.

The default value is null.

Expects an object.

Object that specifies text overrides for headers, messages, and buttons displayed during the AE Connect authentication flow.

The following overrides are available:

  • error_header 
  • login_header 
  • register_header 
  • add_info_header 
  • add_info_button 
  • reset_pw_header 
  • reset_pw_sent 
  • reset_pw_instructions 
  • reset_pw_button 
  • reset_pw_confirm_header 
  • reset_pw_confirm_button 
  • reset_pw_confirm_instructions 
  • reset_pw_done_header 
  • reset_pw_done_message 
  • reset_pw_done_button 
  • verify_email_header 
  • verify_email_sent 
  • verify_email_instructions 
  • verify_email_retry_button 
  • verify_email_success_header 
  • verify_email_success_message 
  • verify_email_success_button 
  • verify_email_error_header 
  • verify_email_error_message 
  • forgot_password_link 
  • recover_password_link 
  • have_account_link 
  • need_help_link 
  • create_account_link 

Here's an example of usage:

aeJS.settings['flow_text'] = {
  error_header: 'Sorry, there seems to be a problem',
  login_header: 'Sign In',
  register_header: 'Sign Up',
  verify_email_retry_button: 'Retry',
  need_help_link: 'need help?'
}

The default value is null.

Expects a boolean.

When true, this setting hides the inline email registration option and presents it as a button that triggers the display of form.

The default value is false.

Expects a string with a language code.

This setting specifies the language to use for error messages for each extra_fields capture.

Use the code value for the associated language:

  • English — en_US 
  • Albanian — sq_AL 
  • Arabic — ar_MA 
  • Basque — eu_ES 
  • Belgium (French) — be_FR 
  • Belgium (Netherland) — be_NL 
  • Bulgarian — bg_BG 
  • Catalan — ca_ES 
  • Chilean Spanish — es_CL 
  • Chinese — zh_CN 
  • Czech — cs_CZ 
  • Danish — da_DK 
  • Dutch (Netherland) — nl_NL 
  • Finnish — fi_FI 
  • French — fr_FR 
  • German — de_DE 
  • Greek — gr_EL 
  • Hebrew — he_IL 
  • Hindi — hi_IN 
  • Hungarian — hu_HU 
  • Indonesian — id_ID 
  • Italian — it_IT 
  • Japanese — ja_JP 
  • Norwegian — no_NO 
  • Persian (Farsi) — fa_IR 
  • Polish — pl_PL 
  • Portuguese (Brazil) — pt_BR 
  • Portuguese (Portugal) — pt_PT 
  • Romanian — ro_RO 
  • Russian — ru_RU 
  • Serbian — sr_RS 
  • Slovak — sk_SK 
  • Spanish — es_ES 
  • Swedish — sv_SE 
  • Taiwanese — zh_TW 
  • Thai — th_TH 
  • Turkish — tr_TR 
  • Ukrainian — ua_UA 
  • Vietnamese — vi_VN 

The default value is en_US.

Expects a boolean.

When true, this settings hides email registration as an option in authentications flows triggered by ae-data-login-window or ae-data-register-window.

The default value is false.

Expects an integer.

Enables an age verification check. Note that in order to use this setting, the birthdate field must be specified as a required field.

The default value is null.

Expects a boolean.

If true, this setting enables AE JS's mobile detection. If a mobile device is detected, then this will override the auth_window setting and force the web browser redirect flow.

Note that there is an onMobileDetect event you can use to perform custom action upon page load if required. This event will fire regardless of the mobile_detect setting.

The default value is true.

Expects an array.

This setting takes an array of object settings that define each opt-in option to be presented in the modal or redirect window for registration and login.

Opt-ins are shown as checkboxes prior to login or registration.

The following object fields can be used:

  • label : The text to show next to a checkbox.
  • brandid  (optional): Brand ID for a specific brand's newsletter or group.
  • segmentid  (optional): Segment ID for a specific segment's newsletter or group.

If no brandid or segmentid is provided, the user will be opted into a global newsletter or group for your account.

Here is an example of usage:

aeJS.settings['optins'] = [
  {
    label: 'Universal Access',
    checked: true
  },
  {
    label: 'Nike',
    brandid: 123
  },
  {
    label: 'Streaming News',
    segmentid: 123,
    checked: false
  },
];

The default value is null.

Expects a string.

A code that identifies external system associated with any registration performed by local framework.

The default value is null.

Expects a string.

The external user ID associated with any registration performed by local framework. Requires partner_code.

For example, your CMS may have a user ID for the logged in user.

The default value is null.

Expects a boolean.

Determines whether the most recent social network demographics will override existing user data on login. For example, the birthdatefield.

The default value is true.

Expects a URL.

This setting specifies the global setting for any return URLs. If not set, the return_url defaults to the active URL when a link or form is triggered with an AE data tag.

This setting is always overridden by anydata-ae-returnattributes.

The default value is null.

Expects an object.

An object that specifies a sub-set of service-specific permissions. These are presented to a user during authentication. They must be a sub-set of permissions already available to the service application. For example, Facebook app permissions.

Here is an example of usage:

aeJS.settings['scopes'] = {
  facebook: 'email, user_actions.music',
  twitter: 'read',
  qq: 'get_user_info',
  weibo: 'email',
  deezer: 'basic_access',
  spotify: 'playlist-read-private'
}

The default value is null.

Expects a string.

This setting takes a comma-separated list of services to offer for registration. This must be a sub-set of the full list of services configured in your AE dashboard. Services will be displayed in the order provided here.

The following services can be specified in the list:

  • facebook 
  • twitter 
  • youtube 
  • google 
  • instagram 
  • tumblr 
  • soundcloud 
  • lastfm 
  • foursquare 
  • spotify 
  • deezer 
  • napster 
  • kakao 
  • weibo 
  • qq 
  • none 

A setting of none shows no configured registration options. When doing custom development, this setting will prevent registration on services not explicitly set. To allow all, leave blank.

Here's an example of usage:

aeJS.settings['services'] = "facebook, twitter";

The default value is null.

Expects a boolean.

If true, social icons will be displayed before email registration and login form.

The default value is true.

Expects a string.

Scope determines whether a user will be automatically signed-in or registered (if sessions available).

Valid options are:

  • application 
  • local

application

If this setting is set to application, a user previously registered on the domain, and a user session exists, AE JS will fire an onUserevent.

If the user previously registered on the domain, and a user session does not exist, AE JS will fire an onLogin event with a state of login when the user signs in.

If user has not previously registered on the domain, AE JS attempts to automatically log the user in if they have previously signed in on any domain with the included framework. If successful, an onLoginevent will be fired with a state of registration and the ssoparameter as true.

In order to succeed, a user must meet the criteria of the current domain's AE JS settings. They must have used a service enabled for the current site, have provided all required fields, and verified their email if required to, etc. If the user does not meet all of the requirements, they must explicitly register.

local

If the user previously registered on the domain, AE JS will fire an onUser event. If not, the user must explicitly register.

The default value is application.

Expects a boolean.

If true, a confirmation email is sent to verify the registered email address during the registration flow. An automated verification URL and screen are provided.

The default value is false.

Expects a boolean.

This setting ensures that the user has a verified email before it triggers login for framework.


How did we do?