> For the complete documentation index, see [llms.txt](https://developer.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.mediarithmics.io/resources/your-first-integration/send-your-first-event/send-events-using-the-tag/matching-your-schema.md).

# Matching your schema

Now that we've found the UserEvent type, we have to look at the properties it has.

In our example, there are only 3 properties: id, timestamp and name. id and timestamp will be autogenerated by the system, so the only info we can add is the name. That's what we do when we send a event this way:

```
mics.push("my-event-name");
```

But now let's consider that we've added some properties to our schema. For instance, when a user gets to the cart page, I want to track the items which are in his/her cart. Each item will have a brand name and its own name.

Your `UserEvent` type should look something like this:

```
type UserEvent  {
    id:ID! @TreeIndex(index:"USER_INDEX")
    ts:Timestamp! @TreeIndex(index:"USER_INDEX")
    name:String! @TreeIndex(index:"USER_INDEX")
    items:[Item!]
}

type Item  {
    id:ID! @TreeIndex(index:"USER_INDEX")
    brand:String! @TreeIndex(index:"USER_INDEX")
    name:String! @TreeIndex(index:"USER_INDEX")
}
```

Now if you want to send this information along with your event, you have to match the structure of your schema, the name of your event being the 1st parameter in the push method, and the 2nd parameter containing all non system-generated properties (remember: `UserEvent` id and timestamp will be autogenerated).

```
mics.push("cart-view", {
    "items": [
        {
            "brand": "brand name 1", 
            "name": "product name 1",
            "id": 1
        },
        {
            "brand": "brand name 2", 
            "name": "product name 2",
            "id": 2
        }
    ],
});
```


---

# 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://developer.mediarithmics.io/resources/your-first-integration/send-your-first-event/send-events-using-the-tag/matching-your-schema.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.
