If your question is about a mobile device, please go back to the mobile version.

��������� ������� ��� ������������� ������������

���� � ��� ������������ ����� � ������ � JavaS�ript, �� ������������ ����������� ���������� � ������ ������������� ������ ����� ��� ������ ������������ ��� ��������� ������������� ������������.

��� �������� �������?
# ��������� � ��������� �������.
  1. �������� ������ �����������.
  2. ��������� � ������ �������.
  3. ������� �� ������ ������� �������.
  4. ������� �������� �������, ����� � �������� ������ �����.
    .
    ���������� ��������������� ��� � �������� PIXEL_ID. ���� ID ������ ����������� �������������� � ��� ����, ��� �� ��������� �� ���� ����.
��� ���������� ����������� ������� �� ����?
����� ��������� �� ����� ���� ������� ������������, ���������� ��������� ��������� � ���� �������, �� ������� ����� ���������� ������ �� ����������. ������������ � ����������� ������������� �� ��������� ������� �� ������ �����. ��� ���������� ������ ��� ����������� PIXEL_ID � price_list_id, ���������� ��� �������� �����-�����.

���� ����������� �������, �������� products_event:
  • view_home � ��������� ������� ��������;
  • view_category � ��������� �������� ��������� ��������;
  • view_product � ��������� �������� ������;
  • view_search � ��������� �������� ������;
  • view_other � ��������� ����� ������ �������;
  • add_to_wishlist � ���������� ������ � ������ �������;
  • add_to_cart � ���������� ������ � �������;
  • remove_from_wishlist � �������� ������ �� ������ �������;
  • remove_from_cart � �������� ������ �� �������;
  • init_checkout � ������ �������;
  • add_payment_info � �������� ��������� ����������;
  • purchase � ���������� �������.

���������:
  • products: array // optional, example: [{"id":"123","recommended_ids":"23,44"}] ������ ������� � �������������� ����������� �� ���, �������� ���� product - ����.
  • products_recommended_ids: string // optional, example: qwe789,rty777 ������ ��������������� �������, � ��� ������, ����� ���������� ������� ���� ���, ���� ������� ��������������� �����-�� ������ ��� �������� � ���������� �������.
  • category_ids: string // optional, example: 12,23,34 ������ ��������� �������, � ��� ������, ����� ���������� ������� ���� ���, ���� ������� ������������� �������� �����-�� ��������� ���������.
  • business_value: int // optional, example: 1000 �������� ����� ������� ��� ������� � �������� ��������, �� 1 �� 1000000.
  • currency_code: string // optional, example: RUR ������ ��� ����� price � price_old.
  • total_price: int // optional, example: 3000 ����� ��������� ������� �� ���� products.
  • search_string: string // optional, example: ����� ��� �������� ��������� ������ ������������.
������ ����������, ����� ��� ����������� ������� (���� view_home) ���� ��������� ���� �� ����� products, category_ids, products_recommended_ids.


���� ������� product:
  • id: string // example: abc123 ID ������ �� �����-�����.
  • group_id: string // optional, example: 22 ������ �������. ���� ������������ ������� �� ���������� ������, � ��� �������� �����-�� ������.
  • recommended_ids: string // optional, example: qwe789,rty777 ID ��������������� ������� ��� ����������� ������ ��� ������ �������.
  • price: int // optional, example: 1000 ����������� ���� ����������� ������ ��� ������ ������� ��� ������� ������������.
  • price_old: int // optional, example: 2000 ������ ���� ��� ������� ������������. �����������, ���� ������ ���� price.
  • price_from: bool // optional, example: 1 ���� ��������, �� ���� price ��������� ���� "��". �����������, ���� ������ ���� price.

������ ������:
�������������� ���������� vk.com/js/api/openapi.js � ��������������� ������� ��� ������ VK.Retargeting.Init()


// PHASE I: Initialisation phase
<div id="vk_api_transport"></div>
<script type="text/javascript">
  window.vkAsyncInit = function() {
    VK.Retargeting.Init(PIXEL_ID);
  };

setTimeout(function() {
    var el = document.createElement("s�ript");
    el.type = "text/javascript";
    el.src = "vk.com/js/api/openapi.js?150";;;
    el.async = true;
    document.getElementById("vk_api_transport").appendChild(el);
  }, 0);
</script>

// PHASE II: When product event should be fired
// Detailed info (in Russian) https://vkcom.github.io/vk-ads-retargeting-demo/index.html
const eventParams = {
"products" : [{"id":"456", "recommended_ids":"abc456,def789"}, {"id":"672", "group_id":"678","recommended_ids":"abc456,def789"}],
"products_recommended_ids" : "55,166,754",
"business_value" : 88,
"total_price" : 34899
};
VK.Retargeting.ProductEvent(PRICE_LIST_ID, "view_product", eventParams);

��������� �������� ������:
VK.Retargeting.ProductEvent(PRICE_LIST_ID, products_event, { <���������> });
price_list_id: int // ex: 12345 // ID �����-�����.
products_event: string // ex: view_product // ��� ������������ �������� (��.����).
��������� ������� � ������� Google Tag Manager
��������� �������� ����� Custom HTML Tag.

<div id="vk_api_transport"></div>
<script type="text/javascript">
// ���������� OpenAPI
  setTimeout(function() {
    var el = document.createElement("s�ript");
    el.type = "text/javascript";
    el.src = "vk.com/js/api/openapi.js?148";;;
    el.async = true;
    document.getElementById("vk_api_transport").appendChild(el);
  }, 0);
// �������, ������� ����� ������ ����� ������������� OpenAPI
  window.vkAsyncInit = function() {
// ������������� �������
    VK.Retargeting.Init(PIXEL_ID);
// ��� ���� ���������� ���������� ��� ��������
// ���������� �������
    VK.Retargeting.ProductEvent(price_list_id, "view_product", eventParams);
};
</script>

������ ���� ��� Google Tag Manager:
<div id="vk_api_transport"></div>
<script type="text/javascript">
  setTimeout(function() {
    var el = document.createElement("s�ript");
    el.type = "text/javascript";
    el.src = "vk.com/js/api/openapi.js?148";;;
    el.async = true;
    document.getElementById("vk_api_transport").appendChild(el);
  }, 0);
window.vkAsyncInit = function() {
    VK.Retargeting.Init(PIXEL_ID);
    VK.Retargeting.Hit(); // ��� ������ ������� ������ �������
    // ��������� ������� ��� ������������� ������������
    // �������� ������
    // ��� ������ ����, ������� �������� ������ � �������, ��� ����� �������� �� ���, ����������� ��� ������ �������
    if (window.location.href.search(/catalog\/[0-9]+\/[0-9]+/) > 1) {
      var eventParams = {
        "products": [{"id": gtm_rem_vk_product_id, "price": gtm_rem_vk_price, "price_old":gtm_rem_vk_price_old}]
      };
      // �������� �������
      VK.Retargeting.ProductEvent(PRICE_LIST_ID, "view_product", eventParams);
    }
};
</script>
��������� ������� � ������� DigitalDataManager
������������ ��������� ��� ���������� ������������� ��������������� DigitalDataManager ����� ��������������� ������� ��������.
��� ����� ����� �������������� �� ���������, ������ �� ������� �����������, �������� �� ���� � ��������� ���������, ������� ��� PIXEL_ID � ��������� �������� �������.
��������� ���������� �� ���������� �������� �� ������.
Your search for returned no results.
Try using other keywords, e.g.: "delete profile", "create chat".
Check your request for misprints.