> For the complete documentation index, see [llms.txt](https://ed.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ed.sunbird.org/release-6.0.0/use/source-code/reference-apps/independent-libraries/sunbird-tag-manager.md).

# Sunbird Tag Manager

Library is used to create Edge Computable Tags agnostic to project, framework choice. This works like a Open Specification to enable clients to generate Tags and Evaluate these tags against a criteria from server.

{% hint style="info" %}
<https://github.com/Sunbird-Ed/sb-tag-manager>
{% endhint %}

{% hint style="info" %}
Supporting Documentation - <https://project-sunbird.atlassian.net/wiki/spaces/CON/pages/1553465352/Criteria+Action+structure>
{% endhint %}

|                                |                                                            |
| ------------------------------ | ---------------------------------------------------------- |
| Current Release Branch         | master                                                     |
| NPM Published version (Latest) | 3.9.19                                                     |
| NPM Package Name               | @project-sunbird/sb-tag-manager                            |
| NPM Link                       | <https://www.npmjs.com/package/sb-tag-manager>             |
| Works                          | Across all projects. (Framework and Tech Agnostic Library) |

### Installation

1. Install the library in the project as follows :

```
npm i @project-sunbird/sb-tag-manager
```

### Getting Started

1. Navigate to App Component (or) Equivalent module and add the following import

```
import { SBTagModule } from 'sb-tag-manager';
```

1. Initialise the Library

```
let instance = SBTagModule.instance;
instance.init();
```

### Services

#### SBTagService

1. Tag Interface Methods

```
instance.SBTagService.pushTag({object},"prefix_string");
instance.SBTagService.getTags("prefix_string");
instance.SBTagService.getAllTags();
instance.SBTagService.removeTag("prefix_string");
instance.SBTagService.removeAll();
```


---

# 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://ed.sunbird.org/release-6.0.0/use/source-code/reference-apps/independent-libraries/sunbird-tag-manager.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.
