---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com.tr/dev/metrika/en/data-import/measurement-upload.md
  - https://yandex.com.tr/dev/metrika/ru/data-import/measurement-upload.md
  - href: en/data-import/measurement-upload.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/metrika/en/llms.txt

# Uploading data

Data is transmitted to `https://mc.yandex.ru/collect` using POST or GET requests. Each parameter in the request represents a `key-value` pair. There are required parameters that depend on the type of interaction, and additional parameters that expand the service's capabilities for analyzing the transmitted data. All parameter values must be URL-encoded and encoded in UTF-8 format (see the [example of sending a pageview](#examples)).

## Supported parameters {#parameters}

#|
|| **Parameter** | **Description** | **Comment** ||
|| `tid` | Tag ID | Required ||
|| `cid` | `ClientID` | Required ||
|| `t` | Type of interaction. Possible values:
- `pageview`
- `event` (JavaScript event, E-commerce events) | Required ||
|| `dr` | Referrer | Required for the `pageview` event ||
|| `dl` | Page URL | Required for the `pageview` event and for any `event` event if the "Receive data only from specified addresses" option is enabled  ||
|| `dt` | Page title | Required for the `pageview` event ||
|| `ea` | Goals | Required for the event `event` ||
|| `params` | Session parameters | These are sent with the `pageview` or `event` event.
Passed parameters are subject to certain [limitations](https://yandex.com/support/metrica/general/limits.html#limits__param) ||
|| `ti` | E-commerce: transaction | Required for the `event` event and `pa=purchase` ||
|| `tr` | E-commerce: transaction revenue | Required for the `event` event and `pa=purchase` ||
|| `tcc` | E-commerce: transaction coupon | Required for the `event` event and `pa=purchase` ||
|| `et` | Time of the event in timestamp format | If it isn't transmitted, the data send time is used. You can transmit data up to 12 hours back from the current time. ||
|| `pa` | E-commerce action with the product (advanced E-commerce). Possible values:
- `detail`: Viewing the item.
- `add`: Adding the item to the shopping cart.
- `remove`: Removing the item from the shopping cart.
- `purchase`: Purchasing. | Required for the event `event` ||
|| `pr<productIndex>id` | E-commerce: product code | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>nm` | E-commerce: product name  | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>br` | E-commerce: product brand  | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>ca` | E-commerce: product category | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>pr` | E-commerce: product price  | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>qt` | E-commerce: item quantity | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>va` | E-commerce: type of product | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>cc` | E-commerce: product coupon code  | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `pr<productIndex>ps` | E-commerce: product position | Required for the `event` event and `pa!=null`. In `productIndex`, specify the serial number of the product in the list ||
|| `sr` | Window size | Parameter value format: `1440x900x30` ||
|| `cu` | Currency | Supported for goals with a value and for E-commerce events ||
|| `ev` | Goal value | Supported when transmitting goals ||
|| `ms` | Secret token | Generated if the Measurement Protocol feature is enabled ||
|#

## Examples of data transmission {#examples}

#### Transmitting a pageview

```http translate=no
https://mc.yandex.ru/collect/?tid=5564333&cid=1710232430899999999&t=pageview&dr=https%3A%2F%2Fyandex.ru&dl=https%3A%2F%2Ftest.com&dt=Test&et=1632467908&ms=01c0a669-d38c-4385-9d22-47cf894ed687
```

#### Achieving a JavaScript "order-success" goal

```http translate=no
https://mc.yandex.ru/collect/?tid=5564333&cid=1710232430899999999&t=event&ea=order-success&et=1632467909&dl=https%3A%2F%2Ftest.com&ms=01c0a669-d38c-4385-9d22-47cf894ed687
```

#### Achieving a JavaScript goal with session parameters

```http translate=no
https://mc.yandex.ru/collect/?tid=5564333&cid=1710232430899999999&t=event&ea=order-success&params={"level1_1":{"level2_1":{"level3_1":"example1","level3_2":"example2"}}}&et=1632467909&dl=https%3A%2F%2Ftest.com&ms=01c0a669-d38c-4385-9d22-47cf894ed687
```

#### Viewing a product card for an Apple iPhone priced at 50,000 with SKU 456

```http translate=no
https://mc.yandex.ru/collect/?tid=5564333&cid=1710232430899999999&t=event&et=1632467910&pa=detail&pr1id=456&pr1nm=iphone&pr1br=apple&pr1pr=50000&ms=01c0a669-d38c-4385-9d22-47cf894ed687
```

#### Adding an item to the shopping cart

```http translate=no
https://mc.yandex.ru/collect/?tid=5564333&cid=1710232430899999999&t=event&et=1632467911&pa=add&pr1id=456&pr1nm=iphone&pr1br=apple&pr1pr=50000&ms=01c0a669-d38c-4385-9d22-47cf894ed687
```

#### Purchasing an item

```http translate=no
https://mc.yandex.ru/collect/?tid=5564333&cid=1710232430899999999&t=event&et=1632467912&pa=purchase&pr1id=456&pr1nm=iphone&pr1br=apple&pr1pr=50000&ti=4555&tr=50000&ms=01c0a669-d38c-4385-9d22-47cf894ed687
```

#### Purchasing multiple items

```http translate=no
https://mc.yandex.ru/collect/?tid=5564333&cid=1710232430899999999&t=event&et=1632467913&pa=purchase&pr1id=456&pr1nm=iphone&pr1br=apple&pr1pr=50000&pr2id=459&pr2nm=airpods&pr2br=apple&pr2pr=20000&ti=4555&tr=70000&ms=01c0a669-d38c-4385-9d22-47cf894ed687
```

## Special considerations {#nuance}

- You can use the Measurement Protocol to create a new session or add information to an existing one.
- To create a session, specify the user's `ClientID`.
- To create a session, you need to transmit at least one pageview (`t=pageview`) at the start of the session.
- These sessions adhere to the same rules and restrictions as regular sessions.
- You can transmit data up to 12 hours back from the current time. If you don't send the `et` parameter, the data send time is specified instead.
- You can update a session only within the session timeout specified manually in the tag settings using the `et` parameter or by sending data without this parameter within the session timeout. Exceeding the timeout starts a new session (after you send a `pageview`).
