> For the complete documentation index, see [llms.txt](https://andreigaspar.gitbook.io/boardme/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://andreigaspar.gitbook.io/boardme/api/users.md).

# Users

## Overview

boardme allows you programmatic access to track your Users.

To use the API you need to have boardme installed into your website or application!

{% hint style="info" %}
If you are using the API within your JavaScript codebase, make sure boardme is imported before your application code!
{% endhint %}

In your application code, you can find boardme on the window object. It is in the global scope.

```
// To store it you could do:
const boardme = window.boardme;

// To use it within TypeScript projects could could do:
declare const boardme: any;

// It is a good idea to play it safe when importing external packages.
// A quick check before using the API is good practice!
boardme && boardme.apiCall();
```

{% hint style="success" %}
**NPM** package is available for improved development experience. Check it out [here](https://www.npmjs.com/package/boardme).
{% endhint %}

### Using the NPM Package

You can add boardme to your project by executing the command below in your terminal.

```
npm install boardme --save
```

Once installed, you can import it into your JavaScript or TypeScript code base and start using the API. The autocomplete should help you find the methods you are looking for.

If you are using the boardme API through the installed package, all your calls will be handled gracefully and you don't have to worry about a script import error crashing your application.

## Setting the User Programmatically

In certain edge cases, you might want to set the boardme User programmatically. This might be because the user data gets loaded in after the boardme script, you're running a complex application on a single page, or it just might be your personal preference.

In any case, boardme offers you an API for that.

## boardme.user();

You can track your user by executing this API method. When executing it, you will need to provide a unique identifier for the user.

### **Arguments**

* **userIdentifier** - the unique identifier of the user as a **string**.

### Example

```
const userIdentifier = "my-super-unique-user-identifier";

boardme.user( userIdentifier );
```


---

# 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://andreigaspar.gitbook.io/boardme/api/users.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.
