> For the complete documentation index, see [llms.txt](https://docs.zigpoll.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zigpoll.com/embed/participant-metadata.md).

# Participant Metadata

Get the most out of your implementation by tracking participant metadata.

In the next section you can learn more about [Participants](/participants.md). In short, Participants allow you to keep track of how individuals have responded to your polls. Participants are automatically tracked based on their session with the basic embed code, but you can save extra data to the participant by adding the following code below the embed code:

```
    <script type="text/javascript">
      window.Zigpoll.user = {
        handle: USER_HANDLE,
        id: USER_ID,
        metadata: {
          first_name: USER_FIRST_NAME,
          last_name: USER_LAST_NAME,
          email: USER_EMAIL
        }
      };
    </script>
```

The additional fields you can explore are the following:

* Handle *\<String>*
* Id *\<String>*
* Metadata *\<Object>*

#### Handle

Handles are intended to be an easy way to view your participants list. For example you might want to list your participants by their first and last name followed by their email address.

#### Id

Id's are unique identifiers for your participants. If you do not supply an ID a unique ID will be provided for you, but it will refresh at the end of each session. **This means that if a user clears their cache, they will be re-created with a new id unless you explicitly pass one in.** You will likely want to replace this with the user id value that you use within your particular database.

#### **Metadata**

Metadata allows you to save any additional information about a Participant that you like. To add more data, just add a key and a value to the metadata object.

{% hint style="info" %}
[Contact us](mailto:support@zigpoll.com) if you need help implementing participant tracking. For paid plans we offer full support.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zigpoll.com/embed/participant-metadata.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
