Content Gate
Restrict specific topics from anonymous (unauthenticated) widget visitors. Authenticated users with verified identity see full answers.
Overview#
Content Gate allows you to define topics that should only be discussed with authenticated users. When an anonymous visitor asks about a gated topic, the AI responds with a custom message instead of the actual answer.
This is useful for protecting sensitive information like:
- Pricing details and discount structures
- Enterprise features or internal roadmap
- API documentation or technical specs
- Partner-specific information
Setup#
Content Gate is configured in your agent settings under the Content Gate section:
Enable Content Gating
Toggle on Enable content gating in the Content Gate section of your agent settings.
Add Gated Topics
Add up to 10 topics that should be restricted. Be specific — for example, use "enterprise pricing tiers" rather than just "pricing" to avoid false positives.
Set the Gated Response
Write a custom message that anonymous users will see when asking about gated topics. For example:
This information is available to registered users.
Please sign in or contact our sales team for details.Set Up User Identification
Content Gate requires user identification to distinguish authenticated from anonymous visitors. See the User Identification docs for setup instructions.
How It Works#
When a message arrives from the widget, the system checks whether the user has a verified identity:
| User Type | Identity Fields | Gated Topics |
|---|---|---|
| Authenticated | Has userId or email with valid HMAC | Full answers — no restrictions |
| Anonymous | Only visitorId, or no identity at all | Sees the gated response message |
| Failed HMAC | Has userId but invalid userHash | Treated as anonymous — sees gated response |
Identity Requirement#
For Content Gate to work, you need to pass user identity when initializing the widget. Here is a minimal example:
<!-- For authenticated users -->
<script>
Respondo.init({ agentId: 'YOUR_AGENT_ID' });
Respondo.identify({
userId: 'user-123',
email: 'user@example.com',
userHash: 'HMAC_SHA256_HASH' // Required if identity_secret is set
});
</script>
<!-- For anonymous visitors — just init without identify -->
<script>
Respondo.init({ agentId: 'YOUR_AGENT_ID' });
// No identify() call — user is anonymous, gated topics will be restricted
</script>For HMAC verification setup, see Identity Verification (HMAC).
Content Gate vs Topics to Avoid
Topics to Avoid blocks topics for all users — both authenticated and anonymous. Use it for topics the agent should never discuss (e.g., competitor comparisons, legal advice).
Content Gate blocks topics only for anonymous users. Authenticated users see full answers. Use it for information you want to share with customers but not with the public (e.g., pricing, internal features).