Last updated 04/24/2024
Before adding content gating make sure you have added the initialization script tag.
The content gating 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 gating 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 header text to meet your unique business needs. Once signed in, users can see the page content.
This guide explains how to add content gating to any page on your site, and how to configure the text content you want it to display.
Find the initialization script you have added to your webpage (see initialization script if you have not added it already)
Find the <script>
tag containing the following Bread & Butter initialization code:
BreadButter.configure({app_id: "[APP_ID]"});
On the page that you would like to content gate (and after the initialization <script>
tag), add the following <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.contentGating({ locale: { CONTENT_GATING: { TITLE: "Your header goes here", SUBTITLE: "Your sub header goes here" } }, scroll_limit: 0, time_limit: 0, image_source: 'IMAGE_URL', image_type: 'IMAGE_TYPE' }); }); </script>
Note: If you have other Bread & Butter feature snippets, just add this snippet below them.
Set the TITLE text & SUBTITLE text. This is the content that appears at the top of the content gating tool.
Set any time or scroll delays.
For the header image, you can choose the default image, your own custom image, or no image.
You should now see the content gating tool appear on the specified page, after the specified time period.
Don’t use Bread & Butter? Want to learn more about how Bread & Butter solves the four biggest problems facing marketers today? Book a demo and see how Bread & Butter is helping marketers make the most of their first-party data
Add authentication & API event tracking to your website/app with a script tag & configuration