> 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/nats-admin/skins-and-templates/further-reading/template-functions/nats_display_stats_retention.md).

# nats\_display\_stats\_retention

*Article Topics:* [*Customization*](/getting-started/common-topics/customization.md)*,* [*Templates*](/getting-started/common-topics/templates.md)*,* [*Smarty*](/using-nats/one-off-articles/smarty.md)

Alias: display\_stats\_retention&#x20;

## Parameters

| Parameter                                                                                                       | Description                                                                  | Possible Values                            | Default Value                                     | Example                |
| --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------ | ------------------------------------------------- | ---------------------- |
| [tpl](/nats-admin/skins-and-templates/further-reading/template-function-parameters/tpl.md)                      | Template used to display output                                              | Any valid template                         | The template, function\_display\_stats\_retention | tpl="my\_template"     |
| period                                                                                                          | The period to get statistics for                                             | Any valid period I.D. number               | 0                                                 | period="7"             |
| no\_form\_vars                                                                                                  | Don't use any form variables                                                 | 1                                          | None.                                             | no\_form\_vars="1"     |
| [count](/nats-admin/skins-and-templates/further-reading/template-function-parameters/count-and-start.md)        | Maximum number of results to display (Click link for details)                | Zero or any whole number greater than zero | 10                                                | count=20               |
| [start](/nats-admin/skins-and-templates/further-reading/template-function-parameters/count-and-start.md)        | Hide all results lower than this number (Click link for details)             | Any whole number greater than zero         | *None.* (Doesn't hide any results)                | start=10               |
| order                                                                                                           | Display statistics in this order                                             | 1                                          | None.                                             | order="1"              |
| no\_order                                                                                                       | Prevent NATS from displaying statistics in order (overrides above parameter) | 1                                          | None.                                             | no\_order="1"          |
| [assign\_prefix](/nats-admin/skins-and-templates/further-reading/template-function-parameters/assign_prefix.md) | Prefix output variables with this word. (Click link for details)             | Any valid Smarty variable name             | *None.* (No prefix is used)                       | assign\_prefix="myvar" |

## Output

Displays member retention statistics using the function\_display\_stats\_retention template. Also store statistics in the following Smarty variables and arrays: {$referral\_count}, {$stats}, and {$totals}.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-functions/nats_display_stats_retention.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
