Skip to main content
Gately provides multiple ways to protect content on your website, from simple login requirements to plan-based access control.

Protection Methods

Data Attributes

Simple HTML attributes for quick protection

SDK Methods

Programmatic access control

Auto Protection

Automatic protection based on URL patterns

Member Content

Database-driven content access rules

Quick Start

Using Data Attributes

The simplest way to protect content:

Using SDK Methods

Protection Levels

How It Works

  1. SDK initializes and checks authentication
  2. Protected elements are identified by data attributes
  3. Access is checked against user’s session and plan
  4. Content is shown/hidden based on access rules
  5. Unauthorized users are redirected or shown alternatives

Configuration

Initialize Protection

Protection is automatically initialized when the SDK loads. You can customize behavior:

Redirect Rules

Configure redirects in your dashboard or via API:

Best Practices

Always provide fallback content for users without JavaScript.
Show loading indicators while checking access to prevent content flash.
Tell users why they can’t access content and how to get access.
For sensitive content, always validate access on the server too.

Security Note

Client-side protection hides content but doesn’t secure it. For truly sensitive data, implement server-side access control using the API.

Next Steps

Member Content

Database-driven content protection

Auto Protect

Automatic URL-based protection