firstPartyParamsHashed (with data self-hashing capability)
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.
ym(XXXXXX, 'firstPartyParamsHashed', parameters);
Parameter | Default value | Type | Description |
---|---|---|---|
parameters * | — | Object | Information that the user left about themself on the site, such as through a feedback form. The previously hashed data is passed as values, except for yandex_cid. Example: |
parameters object fields | |||
Parameter | Default value | Type | Description |
— | 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. |
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. |
Parameter | Default value | Type | Description |
---|---|---|---|
parameters * | — | Object | Information that the user left about themself on the site, such as through a feedback form. The previously hashed data is passed as values, except for yandex_cid. Example: |
parameters object fields | |||
Parameter | Default value | Type | Description |
— | 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. |
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.
Hashing data
-
- For addresses on the Google domain (such as
<name>@gmail.com
), remove dots in the name. For example, replacename.example@gmail.com
withnameexample@gmail.com
. - For addresses on the Yandex domain (such as
<name>@yandex.ru
), replace dots in the name with dashes. For example, replacename.example@yandex.ru
withname-example@yandex.ru
. - Replace addresses on multiple Yandex domains (such as
@ya.ru
or@yandex.com
) with@yandex.ru
. For instance,example@yandex.ru
. - If the name uses the “+” sign (
name+commercial@example.com
), only leave the name:name@example.com
.
- phone_number
-
- The value may only contain digits.
- In the number code, use 7 instead of 8, without the “+” sign at the beginning. For example:
70123456789
.
Be sure to hash all the data except the unique Yandex user ID (yandex_cid), using the MD5 or SHA-256 algorithm.
Example of parameters with hashed values:
...
"email": '78ee6d68f49d2c90397d9ff77fc3814d1',
"phone_number": 'a31259d185ad013e0a663437c605d056'
...