firstPartyParams

Warning

Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don’t know these languages, contact your website developer or webmaster.

The method is available for HTTPS websites.

Sends information about site users to improve the performance of advertising algorithms and more accurate analysis of their behavior on the site. This will help you increase the effectiveness of advertising campaigns and learn more about user behavior, even if they use browsers with limited cross-site tracking cookies (third-party cookies), such as Safari and Mozilla Firefox.

After the first data transfer using this method, the “Filling in contact details” goal will appear in Yandex Metrica. To do this, enable the Automatic goals option.

Note

The data doesn’t need to be hashed. During transfer, the data is hashed automatically and sent to Yandex Metrica in anonymized format.

ym(XXXXXX, 'firstPartyParams', parameters);

Alert

Specify the parameters in lowercase, without commas and spaces at the end.

Parameter

Default value

Type

Description

parameters*

:

Object

Information that a user left about themselves on the site, such as through the feedback form.

     "email": 'mail@example.com',
     "phone_number": '70123456789',
     "first_name": 'Ivan',
     "last_name": 'Ivanov',
     "yandex_cid": 1000034426
 });

Fields for the parameters object:

email

:

String

Email address.

phone_number

:

String

Phone number without spaces in the format 70123456789.

first_name

:

String

User's first name.

last_name

:

String

User's last name.

yandex_cid

:

Integer or String

Unique ID of Yandex user (id). Send it if your website uses Yandex ID authorization.

* Required parameter.

Learn more

Chat with us

Write an email

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.