---
title: Recommendations Events
slug: apis/recommendations-events
docTags: 
createdAt: 2024-06-25T00:30:14.828Z
---



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://{{ Analytics_URL }}/analytics/collect",
  "name": "Reporting Recommendation Impressions",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "event",
        "type": "string",
        "description": "Please use view_recs_list"
      },
      {
        "kind": "required",
        "name": "event_apikey\t",
        "type": "string",
        "description": "Your Klevu JS Api Key, eg. klevu-12345."
      },
      {
        "kind": "required",
        "name": "event_list_id",
        "type": "string",
        "description": "The unique identifier for your KMC Recommendations Banner, eg. 12345-abcde. This is available in the banner configuration metadata as recsKey. If you are not using banners configured within the KMC, please specify a unique identifier for the banner which will be used to distinguish one banner from another."
      },
      {
        "kind": "required",
        "name": "event_list_name",
        "type": "string",
        "description": "The name of the banner, eg. New Arrivals. This is available in the banner configuration metadata as title"
      },
      {
        "kind": "required",
        "name": "event_list_logic",
        "type": "string",
        "description": "The logic type of the banner, eg. NEWEST_ARRIVALS. This is available in the banner configuration metadata as logic."
      },
      {
        "kind": "optional",
        "name": "event_tags",
        "type": "Array",
        "description": "This can be used to specify additional information about the event, which will eventually be made available within the KMC. We recommend you specify the type of page, eg. HOME. This is available in the banner configuration metadata as pageType."
      },
      {
        "name": "user_profile",
        "kind": "required",
        "type": "Object",
        "description": "The json object that holds the user related information such as ip_address. ",
        "children": [
          {
            "name": "ip_address",
            "kind": "required",
            "type": "string",
            "description": "IP address of the shopper who viewed the event \n\n*If calling from javascript, this is an optional parameter."
          },
          {
            "name": "ip_address_v4",
            "kind": "optional",
            "type": "string",
            "description": "IPv4 address of the shopper who viewed a product."
          },
          {
            "name": "ip_address_v6",
            "kind": "optional",
            "type": "string",
            "description": "IPv6 address of the shopper who viewed a product."
          },
          {
            "name": "data_protection",
            "kind": "optional",
            "type": "Boolean",
            "description": "If set to false, Klevu's backend do not obtain the shoppers' IP address. The default value is true."
          },
          {
            "name": "klevu_uuid",
            "kind": "optional",
            "type": "string",
            "description": "Universally unique identifier generated by Klevu, it can be also considered as session id. Please obtain UUID using end-point: https://docs.klevu.com/apis/uuid"
          },
          {
            "name": "klevu_country",
            "kind": "optional",
            "type": "string",
            "description": "2-digit country code of the shopper who viewed a product. Valid codes can be found at https://developers.google.com/hotels/hotel-prices/dev-guide/country-codes"
          },
          {
            "name": "klevu_city",
            "kind": "optional",
            "type": "string",
            "description": "City name of the shopper who viewed a product."
          }
        ]
      },
      {
        "kind": "required",
        "name": "items",
        "type": "Array",
        "description": "Iterate all of the products in the banner and populate the item data for each."
      },
      {
        "kind": "required",
        "name": "item_id",
        "type": "string",
        "description": "The full ID of the product. eg. 12345-54321. This will match the unique value used in your data sync process with Klevu. For compound products consisting of a child/variant and a parent, this is usually parentId-childId."
      },
      {
        "kind": "required",
        "name": "item_group_id",
        "type": "string",
        "description": "The Parent ID of the product. eg. 12345. For compound products consisting of a child/variant and a parent, please specify the ID of the parent. For simple products, please re-use the same value as item_id"
      },
      {
        "kind": "required",
        "name": "item_variant_id",
        "type": "string",
        "description": "The Child ID of the product.eg. 54321. Please specify the ID of the child/variant product. For simple products, please re-use the same value as item_id."
      },
      {
        "kind": "required",
        "name": "item_name",
        "type": "string",
        "description": "The name of the product."
      },
      {
        "kind": "required",
        "name": "price",
        "type": "Number",
        "description": "The final selling price of the product, for example 123.45"
      },
      {
        "kind": "optional",
        "name": "currency",
        "type": "string",
        "description": "The currency of the above price, eg. USD."
      },
      {
        "kind": "optional",
        "name": "item_brand",
        "type": "string",
        "description": "The brand of the product, for example \"Nike\" or \"Acme\"."
      },
      {
        "kind": "optional",
        "name": "item_category",
        "type": "string",
        "description": "The category the item belongs to. For nested categories, use the ; character to separate the hierarchy, and for multiple categories use a double ;;. For example, for 'Mens > Shoes > Trainers' and 'Sale' you would specify: Mens;Shoes;Trainers;;Sale."
      },
      {
        "kind": "required",
        "name": "index",
        "type": "Integer",
        "description": "The order of the product in the listing, starting from 1"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FI7DVhQck3_P270nihiHK",
        "code": "",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FI7DVhQck3_P270nihiHK"
  },
  "examples": {
    "languages": [
      {
        "id": "DjsRpQrxfQsrjFNj4P-wd",
        "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => 'https://stats.ksearchnet.com/analytics/collect',\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => '',\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 0,\n  CURLOPT_FOLLOWLOCATION => true,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => 'POST',\n  CURLOPT_POSTFIELDS =>'[\n  {\n    \"event\": \"view_recs_list\",\n    \"event_apikey\": \"klevu-12345\",\n    \"event_list_id\": \"12345-abcde\",\n    \"event_tags\": [\n      \"recsPageType:category\"\n    ],\n    \"event_list_name\": \"New Arrivals\",\n    \"event_list_logic\": \"NEWEST_ARRIVALS\",\n    \"user_profile\" : {\n       \"ip_address\":\"111.11.11.1\"\n    },\n    \"items\": [\n      {\n        \"item_id\": \"12345-54321\",\n        \"item_group_id\": \"12345\",\n        \"item_variant_id\": \"54321\",\n        \"item_name\": \"Hoodie Sweatshirt\",\n        \"price\": \"123.45\",\n        \"currency\": \"GBP\",\n        \"item_brand\": \"Acme\",\n        \"item_category\": \"All;;Coats & Jackets;;Womens Coats\",\n        \"index\": 1\n      }\n    ]\n  },\n  {\n    \"event\": \"select_recs_list\",\n    \"event_apikey\": \"klevu-12345\",\n    \"event_list_id\": \"12345-abcde\",\n    \"event_tags\": [\n      \"recsPageType:category\"\n    ],\n    \"event_list_name\": \"New Arrivals\",\n    \"event_list_logic\": \"NEWEST_ARRIVALS\",\n    \"user_profile\" : {\n       \"ip_address\":\"111.11.11.1\"\n    },\n    \"items\": [\n      {\n        \"item_id\": \"12345-54321\",\n        \"item_group_id\": \"12345\",\n        \"item_variant_id\": \"54321\",\n        \"item_name\": \"Hoodie Sweatshirt\",\n        \"price\": \"123.45\",\n        \"currency\": \"GBP\",\n        \"item_brand\": \"Acme\",\n        \"item_category\": \"All;;Coats & Jackets;;Womens Coats\",\n        \"index\": 1\n      }\n    ]\n  }\n]',\n  CURLOPT_HTTPHEADER => array(\n    'Content-Type: application/json'\n  ),\n));\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\necho $response;\n",
        "language": "php",
        "customLabel": ""
      },
      {
        "id": "EDjoAAR2ZByzaLdipyefN",
        "code": "var data = JSON.stringify([{\"event\":\"view_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"user_profile\" : {\"ip_address\":\"111.11.11.1\"},\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]},{\"event\":\"select_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]}]);\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = false;\n\nxhr.addEventListener(\"readystatechange\", function() {\n  if(this.readyState === 4) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://stats.ksearchnet.com/analytics/collect\");\nxhr.setRequestHeader(\"Content-Type\", \"application/json\");\n\nxhr.send(data);",
        "language": "javascript",
        "customLabel": ""
      },
      {
        "id": "ZZuMafHLxj_2bRMNg3sSL",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"[\\n  {\\n    \\\"event\\\": \\\"view_recs_list\\\",\\n    \\\"event_apikey\\\": \\\"klevu-12345\\\",\\n    \\\"event_list_id\\\": \\\"12345-abcde\\\",\\n    \\\"event_tags\\\": [\\n      \\\"recsPageType:category\\\"\\n    ],\\n    \\\"event_list_name\\\": \\\"New Arrivals\\\",\\n    \\\"event_list_logic\\\": \\\"NEWEST_ARRIVALS\\\",\\n \\\"user_profile\\\" : {\\\"ip_address\\\":\\\"111.11.11.1\\\"},\\n   \\\"items\\\": [\\n      {\\n        \\\"item_id\\\": \\\"12345-54321\\\",\\n        \\\"item_group_id\\\": \\\"12345\\\",\\n        \\\"item_variant_id\\\": \\\"54321\\\",\\n        \\\"item_name\\\": \\\"Hoodie Sweatshirt\\\",\\n        \\\"price\\\": \\\"123.45\\\",\\n        \\\"currency\\\": \\\"GBP\\\",\\n        \\\"item_brand\\\": \\\"Acme\\\",\\n        \\\"item_category\\\": \\\"All;;Coats & Jackets;;Womens Coats\\\",\\n        \\\"index\\\": 1\\n      }\\n    ]\\n  },\\n  {\\n    \\\"event\\\": \\\"select_recs_list\\\",\\n    \\\"event_apikey\\\": \\\"klevu-12345\\\",\\n    \\\"event_list_id\\\": \\\"12345-abcde\\\",\\n    \\\"event_tags\\\": [\\n      \\\"recsPageType:category\\\"\\n    ],\\n    \\\"event_list_name\\\": \\\"New Arrivals\\\",\\n    \\\"event_list_logic\\\": \\\"NEWEST_ARRIVALS\\\",\\n    \\\"items\\\": [\\n      {\\n        \\\"item_id\\\": \\\"12345-54321\\\",\\n        \\\"item_group_id\\\": \\\"12345\\\",\\n        \\\"item_variant_id\\\": \\\"54321\\\",\\n        \\\"item_name\\\": \\\"Hoodie Sweatshirt\\\",\\n        \\\"price\\\": \\\"123.45\\\",\\n        \\\"currency\\\": \\\"GBP\\\",\\n        \\\"item_brand\\\": \\\"Acme\\\",\\n        \\\"item_category\\\": \\\"All;;Coats & Jackets;;Womens Coats\\\",\\n        \\\"index\\\": 1\\n      }\\n    ]\\n  }\\n]\");\nRequest request = new Request.Builder()\n  .url(\"https://stats.ksearchnet.com/analytics/collect\")\n  .method(\"POST\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "language": "java",
        "customLabel": ""
      },
      {
        "id": "d8aE_l0VU6R3vBKtka0iZ",
        "code": "var request = require('request');\nvar options = {\n  'method': 'POST',\n  'url': 'https://stats.ksearchnet.com/analytics/collect',\n  'headers': {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify([{\"event\":\"view_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"user_profile\" : {\"ip_address\":\"111.11.11.1\"},\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]},{\"event\":\"select_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]}])\n\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});\n",
        "language": "nodejs",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "EDjoAAR2ZByzaLdipyefN"
  },
  "description": "The end-point is used for reporting banner product views.",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "reporting-recommendation-impressions",
  "legacyHash": "q0cVebk74VInhU0RI1pwU"
}
```
:::



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://{{ Analytics_URL }}/analytics/collect",
  "name": "Reporting Banner Product Clicks",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "event",
        "type": "string",
        "description": "Please use select_recs_list"
      },
      {
        "kind": "required",
        "name": "event_apikey\t",
        "type": "string",
        "description": "Your Klevu JS Api Key, eg. klevu-12345."
      },
      {
        "kind": "required",
        "name": "event_list_id",
        "type": "string",
        "description": "The unique identifier for your KMC Recommendations Banner, eg. 12345-abcde. This is available in the banner configuration metadata as recsKey. If you are not using banners configured within the KMC, please specify a unique identifier for the banner which will be used to distinguish one banner from another."
      },
      {
        "kind": "required",
        "name": "event_list_name",
        "type": "string",
        "description": "The name of the banner, eg. New Arrivals. This is available in the banner configuration metadata as title"
      },
      {
        "kind": "required",
        "name": "event_list_logic",
        "type": "string",
        "description": "The logic type of the banner, eg. NEWEST_ARRIVALS. This is available in the banner configuration metadata as logic."
      },
      {
        "kind": "optional",
        "name": "event_tags",
        "type": "Array",
        "description": "This can be used to specify additional information about the event, which will eventually be made available within the KMC. We recommend you specify the type of page, eg. HOME. This is available in the banner configuration metadata as pageType."
      },
      {
        "name": "user_profile",
        "kind": "required",
        "type": "Object",
        "description": "The json object that holds the user related information such as ip_address. ",
        "children": [
          {
            "name": "ip_address",
            "kind": "required",
            "type": "string",
            "description": "IP address of the shopper who purchased the product. \n\n*If calling from javascript, this is an optional parameter."
          },
          {
            "name": "ip_address_v4",
            "kind": "optional",
            "type": "string",
            "description": "IPv4 address of the shopper who viewed a product."
          },
          {
            "name": "ip_address_v6",
            "kind": "optional",
            "type": "string",
            "description": "IPv6 address of the shopper who viewed a product."
          },
          {
            "name": "data_protection",
            "kind": "optional",
            "type": "Boolean",
            "description": "If set to false, Klevu's backend do not obtain the shoppers' IP address. The default value is true."
          },
          {
            "name": "klevu_uuid",
            "kind": "optional",
            "type": "string",
            "description": "Universally unique identifier generated by Klevu, it can be also considered as session id. Please obtain UUID using end-point: https://docs.klevu.com/apis/uuid"
          },
          {
            "name": "klevu_country",
            "kind": "optional",
            "type": "string",
            "description": "2-digit country code of the shopper who viewed a product. Valid codes can be found at https://developers.google.com/hotels/hotel-prices/dev-guide/country-codes"
          },
          {
            "name": "klevu_city",
            "kind": "optional",
            "type": "string",
            "description": "City name of the shopper who viewed a product."
          }
        ]
      },
      {
        "kind": "required",
        "name": "items",
        "type": "Array",
        "description": "Provide specific information about the one product which was clicked within your banner."
      },
      {
        "kind": "required",
        "name": "item_id",
        "type": "string",
        "description": "The full ID of the product. eg. 12345-54321. This will match the unique value used in your data sync process with Klevu. For compound products consisting of a child/variant and a parent, this is usually parentId-childId."
      },
      {
        "kind": "required",
        "name": "item_group_id",
        "type": "string",
        "description": "The Parent ID of the product. eg. 12345. For compound products consisting of a child/variant and a parent, please specify the ID of the parent. For simple products, please re-use the same value as item_id"
      },
      {
        "kind": "required",
        "name": "item_variant_id",
        "type": "string",
        "description": "The Child ID of the product.eg. 54321. Please specify the ID of the child/variant product. For simple products, please re-use the same value as item_id."
      },
      {
        "kind": "required",
        "name": "item_name",
        "type": "string",
        "description": "The name of the product."
      },
      {
        "kind": "required",
        "name": "price",
        "type": "Number",
        "description": "The final selling price of the product, for example 123.45"
      },
      {
        "kind": "optional",
        "name": "currency",
        "type": "string",
        "description": "The currency of the above price, eg. USD."
      },
      {
        "kind": "optional",
        "name": "item_brand",
        "type": "string",
        "description": "The brand of the product, for example \"Nike\" or \"Acme\"."
      },
      {
        "kind": "optional",
        "name": "item_category",
        "type": "string",
        "description": "The category the item belongs to. For nested categories, use the ; character to separate the hierarchy, and for multiple categories use a double ;;. For example, for 'Mens > Shoes > Trainers' and 'Sale' you would specify: Mens;Shoes;Trainers;;Sale."
      },
      {
        "kind": "required",
        "name": "index",
        "type": "Integer",
        "description": "The order of the product in the listing, starting from 1"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FI7DVhQck3_P270nihiHK",
        "code": "",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FI7DVhQck3_P270nihiHK"
  },
  "examples": {
    "languages": [
      {
        "id": "DjsRpQrxfQsrjFNj4P-wd",
        "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => 'https://stats.ksearchnet.com/analytics/collect',\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => '',\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 0,\n  CURLOPT_FOLLOWLOCATION => true,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => 'POST',\n  CURLOPT_POSTFIELDS =>'[\n  {\n    \"event\": \"view_recs_list\",\n    \"event_apikey\": \"klevu-12345\",\n    \"event_list_id\": \"12345-abcde\",\n    \"event_tags\": [\n      \"recsPageType:category\"\n    ],\n    \"event_list_name\": \"New Arrivals\",\n    \"event_list_logic\": \"NEWEST_ARRIVALS\",\n    \"user_profile\" : {\n       \"ip_address\":\"111.11.11.1\"\n    },\n    \"items\": [\n      {\n        \"item_id\": \"12345-54321\",\n        \"item_group_id\": \"12345\",\n        \"item_variant_id\": \"54321\",\n        \"item_name\": \"Hoodie Sweatshirt\",\n        \"price\": \"123.45\",\n        \"currency\": \"GBP\",\n        \"item_brand\": \"Acme\",\n        \"item_category\": \"All;;Coats & Jackets;;Womens Coats\",\n        \"index\": 1\n      }\n    ]\n  },\n  {\n    \"event\": \"select_recs_list\",\n    \"event_apikey\": \"klevu-12345\",\n    \"event_list_id\": \"12345-abcde\",\n    \"event_tags\": [\n      \"recsPageType:category\"\n    ],\n    \"event_list_name\": \"New Arrivals\",\n    \"event_list_logic\": \"NEWEST_ARRIVALS\",\n    \"user_profile\" : {\n       \"ip_address\":\"111.11.11.1\"\n    },\n    \"items\": [\n      {\n        \"item_id\": \"12345-54321\",\n        \"item_group_id\": \"12345\",\n        \"item_variant_id\": \"54321\",\n        \"item_name\": \"Hoodie Sweatshirt\",\n        \"price\": \"123.45\",\n        \"currency\": \"GBP\",\n        \"item_brand\": \"Acme\",\n        \"item_category\": \"All;;Coats & Jackets;;Womens Coats\",\n        \"index\": 1\n      }\n    ]\n  }\n]',\n  CURLOPT_HTTPHEADER => array(\n    'Content-Type: application/json'\n  ),\n));\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\necho $response;\n",
        "language": "php",
        "customLabel": ""
      },
      {
        "id": "EDjoAAR2ZByzaLdipyefN",
        "code": "var data = JSON.stringify([{\"event\":\"view_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"user_profile\" : {\"ip_address\":\"111.11.11.1\"},\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]},{\"event\":\"select_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]}]);\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = false;\n\nxhr.addEventListener(\"readystatechange\", function() {\n  if(this.readyState === 4) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://stats.ksearchnet.com/analytics/collect\");\nxhr.setRequestHeader(\"Content-Type\", \"application/json\");\n\nxhr.send(data);",
        "language": "javascript",
        "customLabel": ""
      },
      {
        "id": "ZZuMafHLxj_2bRMNg3sSL",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"[\\n  {\\n    \\\"event\\\": \\\"view_recs_list\\\",\\n    \\\"event_apikey\\\": \\\"klevu-12345\\\",\\n    \\\"event_list_id\\\": \\\"12345-abcde\\\",\\n    \\\"event_tags\\\": [\\n      \\\"recsPageType:category\\\"\\n    ],\\n    \\\"event_list_name\\\": \\\"New Arrivals\\\",\\n    \\\"event_list_logic\\\": \\\"NEWEST_ARRIVALS\\\",\\n \\\"user_profile\\\" : {\\\"ip_address\\\":\\\"111.11.11.1\\\"},\\n   \\\"items\\\": [\\n      {\\n        \\\"item_id\\\": \\\"12345-54321\\\",\\n        \\\"item_group_id\\\": \\\"12345\\\",\\n        \\\"item_variant_id\\\": \\\"54321\\\",\\n        \\\"item_name\\\": \\\"Hoodie Sweatshirt\\\",\\n        \\\"price\\\": \\\"123.45\\\",\\n        \\\"currency\\\": \\\"GBP\\\",\\n        \\\"item_brand\\\": \\\"Acme\\\",\\n        \\\"item_category\\\": \\\"All;;Coats & Jackets;;Womens Coats\\\",\\n        \\\"index\\\": 1\\n      }\\n    ]\\n  },\\n  {\\n    \\\"event\\\": \\\"select_recs_list\\\",\\n    \\\"event_apikey\\\": \\\"klevu-12345\\\",\\n    \\\"event_list_id\\\": \\\"12345-abcde\\\",\\n    \\\"event_tags\\\": [\\n      \\\"recsPageType:category\\\"\\n    ],\\n    \\\"event_list_name\\\": \\\"New Arrivals\\\",\\n    \\\"event_list_logic\\\": \\\"NEWEST_ARRIVALS\\\",\\n    \\\"items\\\": [\\n      {\\n        \\\"item_id\\\": \\\"12345-54321\\\",\\n        \\\"item_group_id\\\": \\\"12345\\\",\\n        \\\"item_variant_id\\\": \\\"54321\\\",\\n        \\\"item_name\\\": \\\"Hoodie Sweatshirt\\\",\\n        \\\"price\\\": \\\"123.45\\\",\\n        \\\"currency\\\": \\\"GBP\\\",\\n        \\\"item_brand\\\": \\\"Acme\\\",\\n        \\\"item_category\\\": \\\"All;;Coats & Jackets;;Womens Coats\\\",\\n        \\\"index\\\": 1\\n      }\\n    ]\\n  }\\n]\");\nRequest request = new Request.Builder()\n  .url(\"https://stats.ksearchnet.com/analytics/collect\")\n  .method(\"POST\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "language": "java",
        "customLabel": ""
      },
      {
        "id": "d8aE_l0VU6R3vBKtka0iZ",
        "code": "var request = require('request');\nvar options = {\n  'method': 'POST',\n  'url': 'https://stats.ksearchnet.com/analytics/collect',\n  'headers': {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify([{\"event\":\"view_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"user_profile\" : {\"ip_address\":\"111.11.11.1\"},\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]},{\"event\":\"select_recs_list\",\"event_apikey\":\"klevu-12345\",\"event_list_id\":\"12345-abcde\",\"event_tags\":[\"recsPageType:category\"],\"event_list_name\":\"New Arrivals\",\"event_list_logic\":\"NEWEST_ARRIVALS\",\"items\":[{\"item_id\":\"12345-54321\",\"item_group_id\":\"12345\",\"item_variant_id\":\"54321\",\"item_name\":\"Hoodie Sweatshirt\",\"price\":\"123.45\",\"currency\":\"GBP\",\"item_brand\":\"Acme\",\"item_category\":\"All;;Coats & Jackets;;Womens Coats\",\"index\":1}]}])\n\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});\n",
        "language": "nodejs",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "ZZuMafHLxj_2bRMNg3sSL"
  },
  "description": "The end-point is used for reporting banner product clicks.",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "reporting-banner-product-clicks",
  "legacyHash": "Ayp7W8joTUfB8QxVxgzhl"
}
```
:::



