Audience Gate

The <AudienceGate> component restricts a section of a page to visitors with matching audience tags. Content inside the gate is stripped at the edge before the page is served — it never reaches visitors without access.

Audience gating is available on Pro and Enterprise plans. See the Audience Gating guide for full setup — profiles, tokens, and magic links.

Usage

Wrap any block of MDX content in <AudienceGate> with an audience attribute:

<AudienceGate audience="enterprise">

## Dedicated Infrastructure

Enterprise plans include dedicated infrastructure with reserved capacity.
Contact your account manager to get provisioned.

</AudienceGate>

Visitors whose access token includes the enterprise tag see the section. Everyone else sees the page without it — no placeholder, no gap.

Leave a blank line after the opening tag and before the closing tag so the content inside is processed as Markdown.

Multiple Tags

Pass multiple tags separated by commas. The section is visible if the visitor has any matching tag:

<AudienceGate audience="beta, enterprise">

## Early Access Feature

This feature is available to beta testers and enterprise customers.

</AudienceGate>

Page-Level vs Section-Level Gating

Frontmatter audience <AudienceGate> component
Scope Entire page A section within a page
No access Hidden from navigation, search, and AI; direct URL shows an access modal Section silently removed
Navigation Page absent from sidebar and prev/next links Page fully accessible
Search & AI Excluded from search results and AI answers Section excluded from search results and AI answers
Use case Client-specific guides, private APIs Plan-specific callouts, beta features

Both can be combined: a page gated to partners via frontmatter can contain an <AudienceGate audience="enterprise"> section visible only to enterprise partners.

---
title: Partner Integration
audience: [partners]
---

# Partner Integration

Content for all partners.

<AudienceGate audience="enterprise">

## Enterprise SLA

Enterprise partners get a 99.99% uptime SLA.

</AudienceGate>

How It Works

  1. At build time, <AudienceGate> compiles to a marker in the page HTML
  2. Gated sections are chunked separately for search and AI retrieval, tagged with their audience requirements
  3. At request time, the edge resolves the visitor's audience tags from their access token (cookie or x-audience-token header)
  4. Sections the visitor's tags don't match are stripped from the response before it leaves the CDN — the same stripping removes sidebar links to gated pages

Gated content is never present in the HTML delivered to visitors without access — it can't be revealed via view-source or dev tools — and it never appears in search results or AI assistant answers for unauthorized visitors.

Best Practices

  • Keep gated sections self-contained — structure the page so it reads naturally with or without the section
  • Avoid headings inside gates when possible — heading anchors from gated sections appear in the on-page table of contents for all visitors, even when the section itself is stripped
  • Don't gate critical context — pages should make sense to every audience that can reach them
  • Prefer frontmatter gating for whole pages — use <AudienceGate> only when most of a page is shared and a portion is restricted
Was this page helpful?