Tip. 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 “Entering contact information” goal appears in Yandex Metrica. To enable this, select Automatic goals.

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);
Attention. Enter parameter values in lowercase, without commas or spaces at the end.


Default value



parameters *


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

ym(XXXXXX, 'firstPartyParams', {
    "email": '',
    "phone_number": '70123456789',
    "first_name": 'Jon',
    "last_name": 'Smith',
    "yandex_cid": '1000034426',
    "home_address": {
        "street": '100 Main St',
        "city": 'Moscow',
        "region": 'Moscow',
        "postal_code": '12345', 
        "country": 'Russia'
parameters object fields


Default value Type




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.
home_address string User's addresses.
street string Street.
city string City.
region string Region.
postal_code Integer ZIP code.
country string Country.
yandex_cid Integer Unique ID of the Yandex user (id). Send it if your website uses Yandex ID authorization.

* Required parameter.