Last updated 05/05/2023
Before adding the Newsletter tool make sure you have added the initialization script tag.
Add the Bread & Butter Newsletter Sign Up tool to any page on your site. The Newsletter dialog will pop up after a specified number of seconds, prompting to user to authenticate with the provider of their choice to sign up for your newsletter.
Bread & Butter remembers who has signed up, and won’t prompt them again.
This guide explains how to add the Newsletter tool to any page on your site, and how to configure the content you want it to display, including background image.
Find the initialization script you have added to your webpage (see initialization script if you have not added it already)
In the initialization script, find the line:
BreadButter.configure({app_id: "[APP_ID]"});
Add the following line under BreadButter.configure();
BreadButter.ui.addNewsletterWidget({ custom_event_code: 'CUSTOM_EVENT_NAME', delay_seconds: DELAY_TIME_SECONDS, header_text: 'HEADER_TEXT', main_text: 'BODY_TEXT', success_text: 'SUCCESS_TEXT', image_source: 'IMAGE_URL' });
Replace CUSTOM_EVENT_NAME with the user event code that you want to trigger when a user signs up. Don't have an user event or Integration and Rule set up yet? Check out Integration Setup.
IMAGE_URL is optional. If you want to use the default image as seen in the example at the top of the page, simply remove this line.
If you want to add your own custom image, replace IMAGE_URL with the source URL of the image you want to use.
You should now see the Newsletter Sign Up tool appear on the specified page, after the specified time period.
Add authentication & API event tracking to your website/app with a script tag & configuration