--- title: "Track a search result event. This event is used to track when a user receives a search result" slug: "track-a-search-result-event-this-event-is-used-to-track-when-a-user-receives-a-search-result-1" updated: 2024-12-18T18:55:03Z published: 2024-12-18T18:55:03Z canonical: "docs.xgen.ai/track-a-search-result-event-this-event-is-used-to-track-when-a-user-receives-a-search-result-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 search result event. This event is used to track when a user receives a search result Post/customers/{customerId}/users/{userId}/search-result 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": "content_tracking", "action_detail": "search_result", "action_type": "search_service", "query_id": "4893e2d0-2a35-4c58-81b6-ad3906518563", "c_n": "1234", "c_t": "1234,5678,9012", "c_i": "searchResult", "context": { "query": "dress", "deployment_id": "1234", "search_type": "gen_search", "search_response": "These are the results we found....", "is_type_to_search": false, "page": 0, "filters_context": { "color": "Orange" } } }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 query_idstring Used for search events. The query id is sent to the tracker to be able to identify and group search events. Example4893e2d0-2a35-4c58-81b6-ad3906518563 c_nstring The ID of the element or deployment to track Examplesm_el_1234 c_tstring A comma separated list of products Example1234,5678,9012 c_istring A description of the event type ExamplesearchResult 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