How to add Content Gating

Last updated 09/04/2023

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.

Step 1

Find the initialization script you have added to your webpage (see initialization script if you have not added it already)


Step 2

In the initialization script, find the line:

BreadButter.configure({app_id: "[APP_ID]"});

Step 3

Add the following line under BreadButter.configure();

BreadButter.ui.contentGating({
    locale: {
        CONTENT_GATING: {
            TITLE: "Your header goes here"
        }
    },
    scroll_limit: 0,
    time_limit: 0
});


Step 4

Set the TITLE text. This is the content that appears at the top of the Content Gating tool.


Step 5

Set any time or scroll delays.

  • For scroll_limit, choose a value between 0 and 1. Setting it to 0 will load immediately, 0.5 after half of the page is scrolled through, etc. Make sure to set the time value very high if you want content gating to be triggered primarily through the scrolling action of the user.
  • For time_limit, choose the number of seconds after page load until content gating is displayed.

Step 6

You should now see the content gating tool appear on the specified page, after the specified time period.