# Cookies

mediarithmics tracking capabilities rely on first-party cookies, third-party cookies, and local storage variables to identify browsers and capture their activity.

## Cookies installed on the third-party domain `.mediarithmics.com`

These cookies are created on the third-party domain `.mediarithmics.com` (or on the custom domain if used).

| Cookie name | Description                                                                                                                                                                                              | Life duration |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `mics_vid`  | mediarithmics third-party cookie identifier                                                                                                                                                              | 1 year        |
| `mics_lts`  | The last time the browser has been seen                                                                                                                                                                  | 1 year        |
| `mics_uaid` | Legacy cookie that will be deprecated                                                                                                                                                                    | 1 year        |
| `chk`       | In the case of a call on events.mediarithmics.com without a cookie mics\_vid, this cookie is written to check that the user browser supports third party cookies. It contains a randomly generated UUID. | 1 hour        |

## Cookies installed on the first-party domain

These cookies are created on websites where mediarithmics **javascript** tag is installed.

| Cookie name                                                                                       | Description                                                                                                                            | Life duration |
| ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `mics_vid`                                                                                        | Duplication of mediarithmics third-party cookie identifier bearing the same name. Used for caching purposes to avoid unecessary calls. | 6 months      |
| `mics_lts`                                                                                        | The last time the browser has been seen                                                                                                | 6 months      |
| <p><code>mics\_\<custom\_cookie\_name></code> <br>OR<br><code>mics\_\<site\_token></code><br></p> | First-party identifier for the browser (also called "installation ID")                                                                 | 6 months      |

## Local storage variables on the first-party website

Local storage is only used on websites where mediarithmics javascript tag is installed.

| Key                    | Description                                                                                                                                                                                                                                                         |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_mediarithmics`       | <p>Per site token: lastFeedRefreshDate</p><p>Is created only if you have added the syncFeeds</p>                                                                                                                                                                    |
| `<site_token>_mics_up` | <p>This variable is only present if the Edge feature is activated.</p><p>It stores user data, structured as a UserPoint model, including device characteristics, the browsing history on the first-party website and the segments to which the user belongs to.</p> |
| `mics_sgmts`           | <p>This variable is only present if the Edge feature is activated.</p><p>It stores the list of segments to which the user belongs to (duplicate from the above one).</p>                                                                                            |

## Additional cookies and local storage variables when using client-side feeds

Client-side feeds are connectors that involve loading additional javascript, provided by mediarithmics or by a partner (e.g. Facebook Pixel) within the user's browser.&#x20;

If you are using client-side feeds, it is likely that additional cookies and local storage variables are created. Please refer to the [related documentation](https://userguides.mediarithmics.io/activation/feeds#client-side-feeds) for additional details.&#x20;

## Description of the javascript tracker behaviour

The list of calls is generated by the javascript tag.

| URL                                                              | Description                                                                                                                                                                                                          |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| static.mediarithmics.com/tag/1/tag.min.js                        | mediarithmics static javascript tag. Contains the implementation of methods used in the snippet.                                                                                                                     |
| events.mediarithmics.com/v1/conf.js                              | <p>Configuration parameters regarding the tag on the website.</p><p>Also contains a randomly generated first party identifier ("installation ID")</p>                                                                |
| events.mediarithmics.com/v1/sites/\<site\_token>/external\_feeds | Checks if the user belongs to a segment with a tag feed attached                                                                                                                                                     |
| cookie-matching.mediarithmics.com/v1/gather\_id                  | Starts the cookie-matching process with Google and Xandr (if activated)                                                                                                                                              |
| cookie-matching.mediarithmics.com/input                          | Ends the cookie-matching process with Google and Xandr (if activated) by inputting the ID                                                                                                                            |
| cookie-matching.mediarithmics.com/v1/getids                      | <p>Asks for the creation of a mediarithmics third-party cookie identifier (<code>mics\_vid</code>).</p><p>If cookie-matchings with partners are configured, the response will install pixels for those partners.</p> |
| events.mediarithmics.com/v1/visits/pixel                         | Create a tracking event in the datamart related to the site.                                                                                                                                                         |

The following additional calls are made if the Edge feature is activated.

| URL                                                         | Description                                                                  |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------- |
| events.mediarithmics.com/v1/device\_info.js                 | Allows the translation of the browser UserAgent into device characteristics. |
| static.mediarithmics.com/tag/2/evaluator.min.js             | Downloads the local segment evaluator.                                       |
| events.mediarithmics.com/v1/sites/\<site\_token>/segment.js | Downloads the definition of Edge segments.                                   |

Other redirects that might happen in the process

| URL                                                  | Description |
| ---------------------------------------------------- | ----------- |
| events.mediarithmics.com/v1/check\_cookie/pixel      |             |
| events.mediarithmics.com/v1/update\_mapping/pixel    |             |
| cookie-matching.mediarithmics.com/v1/get\_or\_create |             |


---

# Agent Instructions: 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://developer.mediarithmics.io/advanced-usages/data-privacy-compliance/cookies.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.
