---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/support/metrica/en/data/yclid.md
  - https://yandex.com/support/metrica/es/data/yclid.md
  - https://yandex.com/support/metrica/pt/data/yclid.md
  - https://yandex.com/support/metrica/ru/data/yclid.md
  - https://yandex.com/support/metrica/tr/data/yclid.md
  - https://yandex.com/support/metrica/zh/data/yclid.md
  - href: en/data/yclid.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: Tracking conversions by yclid
description: "To link conversions to Yandex\_Direct traffic, you need to collect yclid tags using a special JavaScript code and send them to Yandex\_Metrica in a CSV file along with information about the conversions."
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/en/llms.txt


# Tracking conversions by yclid

By default, Yandex Metrica attributes a conversion to the converted session.


{% cut "Learn more" %}

For example, a user clicked an ad and went to the website, but there was no conversion. The user then clicked through to the website from search results and performed a target action: a conversion occurred. Yandex Metrica will assign the conversion to traffic from search results.

{% endcut %}


You can tell the system to assign certain conversions to Yandex Direct. These may include conversions that Yandex Metrica has already attributed to a different source, or conversions made offline (for instance, a payment registered on the payment system side or an order confirmed by phone). Conversions manually linked to clicks from Yandex Direct allow for even more precise adjustment of [display strategies](https://yandex.com/support/direct/strategies/select-strategy.html) based on your business objectives.

To link conversions to Yandex Direct traffic, you need to collect [yclid](*yclid) tags via a special JavaScript code and send them to Yandex Metrica in the CSV file along with the information about the conversions done. See the instructions below.

Use [Recording offline conversions](https://yandex.com/support/metrica/en/data/offline-params.md#conversion-period) for linking. This means that the conversion data will be attributed to a session in Yandex Metrica if no more than 21 days have passed between the session with the relevant `yclid` and the time the conversion file was processed. Hence, the earlier you pass information about the `yclid` values and conversions, the more likely it is that conversions will be attributed to sessions.

You can view conversion data in any Yandex Metrica report. To do this, add a goal that you created for tracking conversions. When selecting the [Last click](https://yandex.com/support/metrica/en/reports/attribution-model.md#last) attribution model, some sessions will not be displayed as the click-through from the ad might not be the last in the session history.

Here's how to use `yclid`:
1. [Set up yclid receipt via JavaScript](https://yandex.com/support/metrica/en/data/get-yclid.md) on your website.
1. In the tag settings, go to **Upload data** and enable [Recording offline conversions](https://yandex.com/support/metrica/en/data/offline-params.md#conversion-period).
1. <!-- source: en/_includes/data/offline-conversion-data/id-offline-conversion-data/yclid-data1.md -->
   On the **Goals** page, create a [JavaScript event goal](https://yandex.com/support/metrica/en/general/goal-js-event.md) in the left menu. For the goal ID, specify the event you want to track (for example, order confirmation — "order_confirmed"). You will need this ID when creating a CSV file.
   <!-- endsource: en/_includes/data/offline-conversion-data/id-offline-conversion-data/yclid-data1.md -->
    
    <!-- source: en/_includes/data/offline-conversion-data/id-offline-conversion-data/yclid-data2.md -->
    If you want to analyze offline conversions separately from conversions on the website, enter a more specific description in **Name** (for instance, “Purchase in office”, “Offline goal”, or “Cash payment”). This will make it easier to find the goal in the list.
    <!-- endsource: en/_includes/data/offline-conversion-data/id-offline-conversion-data/yclid-data2.md -->
    
    You can use a previously created goal if conversions for this goal are done both on the website and offline and you want to get general statistics. In this case, only send data with the `yclid` values for conversions that occur outside of your website.
    
1. [Send yclid values to Yandex Metrica in the CSV file](https://yandex.com/support/metrica/en/data/offline-conversion-data.md#make-file). Information can also be sent using the [Yandex Metrica API](https://tech.yandex.com/metrika/doc/api2/management/offline_conversion/upload-docpage/).
1. Analyze the conversion rate of your **Yandex Direct** campaigns and use goals in setting up [display strategies](https://yandex.com/support/direct/strategies/select-strategy.html) of ads in Yandex Direct.

<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
<!-- endsource: en/_includes/buttons/chat-button.md -->

<!-- source: en/_includes/data/support-button.md -->
<div class="cut-button">

{% cut "Write an email" %}

<!-- source: en/_includes/popup/id-popup/wrong-sup.md -->
Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.
<!-- endsource: en/_includes/popup/id-popup/wrong-sup.md -->

<div style="padding: 15px;
         margin: 10px 0;
         background: #FFFFFF;
         border-radius: 10px;
         border: 1px solid var(--g-color-line-generic);">
      <iframe style="background: #FFFFFF;"
            height="700"
            width="100%"
            frameborder="0"
            src="https://forms.yandex.com/surveys/1707/?&iframe=1&lang=en">
      </iframe>
    </div>

{% endcut %}

</div>

<!-- source: en/_includes/styles/cut-button.md -->

<!-- endsource: en/_includes/styles/cut-button.md -->
<!-- endsource: en/_includes/data/support-button.md -->

<!-- source: en/_includes/footer-links.md -->
- - -

<div class="borderless-table">

#|
||
Useful links

- [Demo tag](https://metrica.yandex.com/r/dashboard?)
- [Add a tag](https://metrica.yandex.com/add/)
- [Free tag setup](https://yandex.com/promo/freeservice/metrica?utm_source=help_metrica_en&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com/metrika/)
- [Suggest your idea](https://yandex.com/support/metrica/troubleshooting/idea.html)
- [Discuss in Telegram](https://t.me/yandexmetrika)
|
Online training

- [Get a Yandex Metrica certificate](https://yandex.ru/adv/expert/exam/metrika/?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)


- [Take a training course](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

<!-- source: en/_includes/styles/table-style.md -->

<!-- endsource: en/_includes/styles/table-style.md -->
<!-- endsource: en/_includes/footer-links.md -->

[*yclid]: The ID of a click on a Yandex Direct ad, assigned by Yandex Direct. It is passed in the ad’s URL. Used for tracking a [website traffic source](https://yandex.com/support/metrica/en/general/source-tags.md).