Last updated 09/04/2023
Before adding content preview, make sure you have added the initialization script tag.
Bread & Butter’s content preview feature allows you to limit access to specific web pages on your website to visitors that have authenticated. When the user goes to the page, the content is partially hidden by the content preview sign in section. It can be configured to appear immediately, after a period of time, or when a user scrolls past a certain percent of the page.
You can also customize the text content at the bottom to meet your unique business needs. Once signed in, users can see the page content.
You can now add the Content Preview feature to your website by following these steps:
Select the Custom Code tab.
In the Head Code field, paste in the following script tag after the Bread & Butter initialization script tag:
<script> null == window.breadbutterQueue && (window.breadbutterQueue = []), window.injectBreadButter = function (e) { "undefined" != typeof BreadButter && BreadButter.init ? e() : window.breadbutterQueue.push(e) }; injectBreadButter(function () { BreadButter.ui.contentPreview({ restricted_links: ["CONTENT_PREVIEW_PAGE"], scroll_limit: 0, time_limit: 0, clickable_content: false, fixed_height: 75 locale: { POPUP: { TEXT_3: 'TEXT LINE 1', TEXT_3_2: 'TEXT LINE 1 EXPANDED', MORE: 'EXPAND LABEL', } }, }); }); </script>
Note: If you have other Bread & Butter feature snippets, just add this snippet below them.
Replace CONTENT_PREVIEW_PAGE with the page (or pages) you want to apply content preview to. Enter the URL like this:
["/work"]
Or like this for multiple pages:
["/work/project-1", "/work/project-2"]
You can also user a wildcard * to block all URLs under /work/, like /work/projects, but not including /work:
["/work/*"]
The 3 remaining fields under POPUP allow you to customize the text that appears below the sign in options.
Add authentication & API event tracking to your website/app with a script tag & configuration