--- title: "Track a category view event. This event is used to track when a user views a category page such as a Product Listing Page" slug: "track-a-category-view-event-this-event-is-used-to-track-when-a-user-views-a-category-page-such-as-a-product-listing-page-1" updated: 2024-12-18T18:55:03Z published: 2024-12-18T18:55:03Z canonical: "docs.xgen.ai/track-a-category-view-event-this-event-is-used-to-track-when-a-user-views-a-category-page-such-as-a-product-listing-page-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.xgen.ai/llms.txt > Use this file to discover all available pages before exploring further. # Track a category view event. This event is used to track when a user views a category page such as a Product Listing Page Post/customers/{customerId}/users/{userId}/category-view SecurityAPI KeyHeader parameter nameaccess_token Access token Authentication Path parameterscustomerIdstringRequired userIdstringRequired Body parametersExpand Allobject Example{ "rec": "1", "idsite": "1234", "url": "https://example.com", "urlref": "https://example.com", "locale": "en_US", "uid": "{\"customer_id\":\"customer_id\",\"user_type\":\"return_user\",\"testing_group_name\":\"Inactive\",\"session_id\":\"524e0542-5713-4755-a8c0-1430cbd58aa9\"}", "action_name": "category_view", "action_detail": "category_view", "action_type": "ecomm", "cvar": "{\"5\":[\"_pkc\",\"Category Name\"]}", "context": { "plpProducts": [ "1234", "5678" ] } }recstring Default parameter to send with event payload Example1 idsitestring The tracking_id of the site Example1234 urlstring The URL of the page Examplehttps://example.com urlrefstring The referrer URL Examplehttps://example.com localestring The locale of the user Exampleen_US uidstring A string representation of the user object Example{"customer_id":"customer_id","user_type":"return_user","testing_group_name":"Inactive","session_id":"524e0542-5713-4755-a8c0-1430cbd58aa9"} action_namestring The name of the action that was performed. Examplecontent_tracking action_detailstring Details on the action that was performed. Examplesearch_result action_typestring The meta action that was performed. Examplesearch_service cvarstring A string representation of a JSON object containing information about the product. _pkp is the product's price, _pks is the product's sku, _pkn is the product's name, _pkc is the product's currency. Example{"2":["_pkp",1000],"3":["_pks","1234"],"4":["_pkn","product_name"],"5":["_pkc","{"currency_code":"USD"}"]} contextobject A JSON object of context data. Used to pass dynamic, additional data to the tracker. Example{ "key1": "value1", "key2": 1000, "nested": { "key": "value" }, "array": [ "1", "2", "3" ] } Responses200 Successful response 400 Bad request 401 Unauthorized 403 Forbidden 500 Internal server error