Last updated 05/17/2023
With Bread & Butter, you can set custom fields that your users are asked to enter after they register. For example, you may want to know their company name, phone number, company size, or industry.
After your users complete the login process, they’ll see something like the following:
For example, if you want to add 2 text boxes, a mandatory checkbox, and have custom text, this is what you would add:
locale : {
"CUSTOM_DATA": {
"HEADER": "Thanks for Signing Up",
"SUB_HEADER": "We just have a few questions we'd like to ask you",
"SUBMIT": "Submit",
"MANDATORY": "This field is mandatory."
}
},
custom_data: [{
custom_key: 'company_name',
display_name: 'Company Name',
type: 'textbox',
mandatory: false,
},
{
custom_key: 'phone',
display_name: 'Phone Number',
type: 'textbox',
mandatory: true,
},
{
custom_key: 'agree_toc',
display_name: 'I agree to the <a href="www.google.com" target="_blank">terms & conditions</a>',
type: 'checkbox',
mandatory: true,
default_value: true
}
]
For the display content in Locale:
For the actual registration fields:
Once you’ve constructed the fields and display information you’d like to set (using the format in the example above), follow these steps to add the content to the head code for your site. If you need any assistance, please don’t hesitate to contact our support team.
Select the Custom Code tab.
In the Head Code field, add the locale and custom code after the App ID in the initialization script.
If you need any assistance with this step, please feel free to contact our support team.
Add authentication & API event tracking to your website/app with a script tag & configuration