> For the complete documentation index, see [llms.txt](https://docs.toomuchmedia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toomuchmedia.com/content-management/member-areas-and-tours/trial-member-areas.md).

# Trial Member Areas

*Article Topics:* [*Member Area*](/getting-started/common-topics/member-area.md)

**Trial Member Areas** allow administrators to offer limited content previews and access rules specifically tailored for trial members. By configuring trial member restrictions, you can control how many unique content sets trial members can access and whether they can watch full videos or trailers only, encouraging trial members to upgrade to full memberships.

***

## How It Works

When a member with the **trial** status logs into a CMS Member Area and attempts to view content:

1. **System Check**: NATS checks the global system setting `CMS_MAX_TRIAL_SETS`.
2. **Viewed Set Tracking**:
   * If `CMS_MAX_TRIAL_SETS` is configured (`>= 0`), NATS tracks which content sets the member has already accessed during their trial.
   * Set IDs viewed by a member are saved in their CMS settings record (`trial_sets` array in the `cms_member_setting` database table).
3. **Access Control Evaluation**:
   * **New Set (Under Limit)**: Access is granted. NATS adds the set ID to the member's `trial_sets` list and increments their viewed count.
   * **New Set (Limit Reached)**: Access is blocked (`authorized = 0`, `trial_restricted = 1`).
   * **Previously Viewed Set**: Access is permitted without consuming additional set views.

***

## Configuring Max Trial Sets

Administrators can set the global limit for trial member set views under **System Configuration**:

* **Setting Name**: `CMS_MAX_TRIAL_SETS`
* **Location**: **System Configuration** -> **Content Management (CMS)** settings.
* **Value Options**:
  * `-1` *(Default)*: **No restriction**. Trial members can view an unlimited number of content sets.
  * `0`: Trial members are restricted from viewing any content sets.
  * `Positive Integer` *(e.g., `3`)*: Limits trial members to viewing that exact number of unique content sets before an upgrade is required.

{% hint style="info" %}
**Note:** Purchased content sets bypass trial set limit restrictions, allowing members to access purchased sets even if their trial view limit has been reached.
{% endhint %}

***

## Restricting Video Access in Set View

In addition to limiting total set views globally, a **Set View Block** exposes a setting intended to restrict video playback for trial members:

* **Setting Name**: `Trial Member Video Limits` (`set_view_trial_member_video_type`)
* **Location**: **Theme / Block Builder** -> **Set View Block** -> **Design** tab -> video-specific settings.
* **Options**:
  * `Use Theme Default` *(block-level default)*: Inherits the theme's configured value.
  * `All Videos` *(theme-level default)*: Trial members can view full video content in the set.
  * `Trailers Only`: Trial members would be limited to trailer content for videos in the set.

{% hint style="warning" %}
**Not currently enforced:** the backend check that would apply this restriction (in `ContentCommon::get_sets()`) is commented out in the current codebase. Selecting `Trailers Only` has no effect on what content is returned to trial members — the setting is exposed in the block builder UI but does not currently gate video access. Treat this as a known limitation rather than working behavior until the enforcement code is restored.
{% endhint %}

***

## Frontend Integration & API Payload

When a member authenticates via the CMS API controller (`MemberAPIController`), NATS automatically includes the member's trial status and details in the authentication payload:

```json
"trial_details": {
    "max_trial_sets": 3,
    "trial_sets": [102, 105],
    "count_trial_sets": 2
}
```

### Response Fields

* `max_trial_sets`: The global limit configured via `CMS_MAX_TRIAL_SETS` (or `-1` if unrestricted).
* `trial_sets`: An array of set IDs that the member has already viewed during their trial.
* `count_trial_sets`: The number of unique content sets viewed so far.

### Theme & Badge Usage

Frontends and custom themes can read `trial_details` to build interactive user interface elements such as:

* Progress banners (e.g., *"You have used 2 of your 3 trial set views"*).
* Upgrade call-to-action prompts when a trial member reaches their limit.

***

## Related Articles

{% content-ref url="/pages/GdRXSOg33BCti9DITjdb#member-area-specific-settings" %}
[Member Area and Tour Details](/content-management/member-areas-and-tours/member-area-and-tour-details.md#member-area-specific-settings)
{% endcontent-ref %}

{% content-ref url="/pages/Fns3udit6BYx3GkOiHU4" %}
[Set View Block](/content-management/member-areas-and-tours/themes/block-types/set-view-block.md)
{% endcontent-ref %}
