---
metadata:
  - name: generator
    content: Diplodoc Platform v5.55.2
alternate:
  - https://yandex.com/support/metrica/en/objects/first-party-params.md
  - https://yandex.com/support/metrica/es/objects/first-party-params.md
  - https://yandex.com/support/metrica/pt/objects/first-party-params.md
  - https://yandex.com/support/metrica/ru/objects/first-party-params.md
  - https://yandex.com/support/metrica/tr/objects/first-party-params.md
  - https://yandex.com/support/metrica/zh/objects/first-party-params.md
  - href: zh/objects/first-party-params.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: firstPartyParams
description: 发送有关网站用户的信息，以提高广告算法的性能并更准确地分析他们在网站上的行为。
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/zh/llms.txt


# firstPartyParams

<!-- source: zh/_includes/code/counter-initialize/id-counter-initialize/rest-js.md -->
{% note warning %}

使用 JavaScript API 需要了解 HTML 和 JavaScript。 如果您不了解这些语言，请联系您的网站开发人员或站长。

{% endnote %}
<!-- endsource: zh/_includes/code/counter-initialize/id-counter-initialize/rest-js.md -->

该方法适用于 HTTPS 网站。

发送有关网站用户的信息，以提高广告算法的性能并更准确地分析他们在网站上的行为。 这有助于您从广告系列中获得更佳效果，并了解更多关于用户行为的信息，即使网站访客使用限制跨站跟踪 cookie（第三方 cookie）的浏览器（如 Safari 或 Mozilla Firefox）也是如此。

使用此方法进行第一次数据传输后，**Entering contact information**目标出现在 Yandex Metrica 中。 要启用此项，请选择[Automatic goals](https://yandex.com/support/metrica/zh/general/auto-goals.md)。

{% note info %}

数据不需要进行散列处理。 在传输过程中，数据会自动进行散列处理并以匿名格式发送到 Yandex Metrica。

{% endnote %}

```javascript
ym(XXXXXXXX, 'firstPartyParams', parameters);
```

{% note alert %}

请以小写形式指定参数，末尾不要加逗号和空格。

{% endnote %}

#|
||
**参数**
|
**默认值**
|
**类型**
|
**描述**
||
||
`参数`*
|
—
|
Object
|
用户在网站上（例如，通过反馈表）留下的有关自己的信息。

```javascript
ym(XXXXXXXX, 'firstPartyParams', {
    "email": 'mail@example.com',
    "phone_number": '70123456789',
    "first_name": 'John',
    "last_name": 'Smith',
    "yandex_cid": 1000034426
});
```
||

||
**parameters 对象的字段**：
|
>
||
||
`email`
|
—
|
字符串
|
电子邮件地址。
||
||
`phone_number`
|
—
|
字符串
|
电话号码不带空格，格式为 70123456789。
||
||
`first_name`
|
—
|
字符串
|
用户的名字。
||
||
`last_name`
|
—
|
字符串
|
用户的姓氏。
||
||
`yandex_cid`
|
—
|
Integer 或 String
|
[唯一 ID](https://yandex.com/dev/id/doc/dg/api-id/reference/response.html) (`ID`)。 如果您的网站使用 Yandex ID 授权，请发送它。
||
|#

<sup >*</sup>必填参数。

## 了解详情

- [检查高级跟踪设置的数据传输](https://yandex.com/support/metrica/zh/objects/check-first-party-params.md)

<!-- source: zh/_includes/buttons/chat-button.md -->
[与我们聊天](https://yandex.com/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

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

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

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

{% cut "发送电子邮件" %}

<!-- source: zh/_includes/popup/id-popup/wrong-sup.md -->
请注意：我们的支持团队永远不会主动给您打电话。 请勿按照自称为 Yandex Metrica 支持团队来电者的指示操作。
<!-- endsource: zh/_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/1706/?&iframe=1&lang=en">
  </iframe>
</div>

{% endcut %}

</div>

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

<!-- endsource: zh/_includes/styles/cut-button.md -->
<!-- endsource: zh/_includes/buttons/support-button.md -->

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

<div class="borderless-table">

#|
||
实用链接

- [演示计数器](https://metrica.yandex.com/r/dashboard?)
- [添加计数器](https://metrica.yandex.com/add/)
- [免费计数器设置](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/)
- [提出您的想法](https://yandex.com/support/metrica/troubleshooting/idea.html)
|
线上培训



- [参加培训课程](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

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

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