How does it work?

Gatekeeper is a rules engine that allows you, the website operator, to craft custom policies for your website. After some light technical integration, you can script how your website responds to different visitors without actually knowing any programming languages.


The first step is to determine the different possible responses that your website might give. By default, most websites will want to simply show the requested content. New responses in your toolbox might include:

ResponseAlso known as
Whoa! Slow down and let's check you're humanShow a CAPTCHA
Stop! We don't like what you're doingBan

Obviously, you can customize these responses, such as:

ResponseAlso known as
Hi there, you seem to like our website; you have more free articlesShow a small banner
Welp, you've gone through your free articles allotmentSell a subscription


Once you have your responses set up (e.g. you've implemented the "Sell a subscription" page), you can start the technical integration. Essentially, eveyr time a request comes in, your webserver (e.g. controller/servlet) can send the relevant details of the visit (e.g. URL of the request, the IP address of the visitor, the user-agent, and the user ID) to Gatekeeper and get a response indicating what should happen (Show a banner? Sell a subscription?). Gatekeeper tracks visit information over time and, based on the visit history, figures out which policy applies to the current situation.


After you have defined the various responses and have done the technical work of having your server ask Gatekeeper what to do, you've installed a brain for your website. The last step is to teach Gatekeeper what policies you would like to implement on your website.

There are three major building blocks to configuring policies:

Visitor groups

A way of grouping visitors, whether by IP address or by user IDs. Visitors that meet the criteria of the group will be considered to be in that visitor group. Different policies can be customized to different visitor groups. For example, maybe Google search crawlers are one group and maybe servers on Amazon Web Services are a different group.

Page groups

A way of organizing content. You can categorize your content into different groups. Some categories of content (e.g. old news), you might not care much about. Other pages might be content that you want to craft specific responses to (maybe a frequent reader of business articles would like to sign up for the business mailing list).


Policies are where everying comes together in Gatekeeper: visitor groups, page groups, and responses. Policies allow you to express what should happen (response) when certain visitors (matching a visitor group) visits certain content (page groups).

Server-side analytics

Integral to its functionality, Gatekeeper uses site visits to determine what response to give. By virtue of tracking visit history, Gatekeeper has the data needed to serve as the foundation of a server-side analytics tool. Rather than relying on users (who might have turned off JavaScript or might have an extension that blocks tracking), Gatekeeper tracks requests that are asked of the server. Gatekeeper also allows clients to drill down into visit patterns, even down to the level of an individual session.