> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cludo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Track Result Click

> Record when a user clicks a search result.



## OpenAPI

````yaml /openapi/tracking.json post /api/v3/{customerId}/{engineId}/search/pushstat/clicklog
openapi: 3.1.0
info:
  title: Cludo Tracking API
  version: 4.0.0
  description: >-
    Analytics tracking endpoints for search queries and result clicks
    (pushstat).
servers:
  - url: https://api.cludo.com
    description: EU region (Customer IDs below 10,000,000)
  - url: https://api-us1.cludo.com
    description: US region (Customer IDs 10,000,000 and above)
security:
  - SiteKey: []
paths:
  /api/v3/{customerId}/{engineId}/search/pushstat/clicklog:
    post:
      summary: Track Result Click
      description: Record when a user clicks a search result.
      operationId: trackResultClick
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/engineId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrackResultClickBody'
      responses:
        '200':
          description: Result click event recorded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrackingSuccessResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - {}
        - SiteKey: []
        - BasicAuth: []
components:
  parameters:
    customerId:
      name: customerId
      in: path
      required: true
      description: Must match the customer id used in the search that produced `qid`.
      schema:
        type: integer
    engineId:
      name: engineId
      in: path
      required: true
      description: Must match the engine id in the same search request path.
      schema:
        type: integer
  schemas:
    TrackResultClickBody:
      type: object
      description: >-
        Definition of the log source. Use 'searchresult' for regular clicks and
        'banner' for banner clicks.
      properties:
        ls:
          type: string
          enum:
            - searchresult
            - banner
          description: >-
            `searchresult` for organic SERP clicks; `banner` when the user
            clicked a promotional banner.
        sw:
          type: string
          description: The search query.
        qid:
          type: string
          description: A unique string used as the ID of the query.
        clurl:
          type: string
          description: The URL of the result that was clicked.
        cli:
          type: string
          description: The rank of the clicked item in the result list.
        title:
          type: string
          description: The title of the result that was clicked.
        sz:
          type: string
          description: The pixel resolution of the visitor's screen (e.g. `1920x1080`).
        ua:
          type: string
          description: The browser user-agent.
        refurl:
          type: string
          description: The URL of the page that referred the user to the search results.
        refpt:
          type: string
          description: The title of the page that referred the user to the search results.
        brl:
          type: string
          description: The browser language.
        pn:
          type: string
          description: The page number of the results the user was viewing.
        hn:
          type: string
          description: The hostname of the page the query originated from.
        sid:
          type: string
          description: >-
            The session ID (cookie or generated) to stitch multiple events per
            visit.
        qsid:
          type: string
          description: A unique string used as the ID of the query session.
        cloi:
          type: string
          description: The ID of the banner that was clicked.
        dt:
          $ref: '#/components/schemas/DeviceType'
    TrackingSuccessResponse:
      type: object
      description: Success response containing the server-generated tracking ID.
      properties:
        id:
          type: string
          description: Unique identifier for the recorded tracking event.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    DeviceType:
      type: string
      enum:
        - mobile
        - tablet
        - desktop
      description: The device class for analytics segmentation.
    ErrorResponse:
      type: object
      description: Error response returned when a request fails.
      properties:
        message:
          type: string
          description: A message describing what went wrong.
    NotFoundResponse:
      type: object
      description: Returned when the engine does not belong to the given customer.
      properties:
        Message:
          type: string
          description: Explains the mismatch between the engine (SiteId) and customer.
    ServerError:
      type: object
      description: Returned when an unexpected server error occurs.
      properties:
        status:
          type: string
          description: HTTP status name.
        code:
          type: integer
          description: HTTP status code.
        messages:
          type: array
          items:
            type: string
          description: Error details, usually including a support reference id.
  responses:
    BadRequest:
      description: >-
        The request is invalid. This typically occurs due to missing required
        fields, incorrect parameter values, or malformed request body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: >-
              The request could not be processed. Check the request body and
              required parameters.
    NotFound:
      description: The engine ID does not belong to the specified customer ID.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundResponse'
          example:
            Message: Mismatch between SiteId <ID> and CustomerId <ID>
    InternalServerError:
      description: >-
        An unexpected server error occurred. If this persists, contact
        support@cludo.com.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServerError'
          example:
            status: InternalServerError
            code: 500
            messages:
              - 'Error occur. Please contact support with error ID: <error-id>'
  securitySchemes:
    SiteKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        SiteKey authentication. Pass the full value including the `SiteKey`
        prefix: `SiteKey <base64(customerId:engineId:searchKey)>`. Example:
        `SiteKey dGVzdDoxMjM0NTY3Ojk4NzY1`.
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication. Use your Customer ID as the username and API Key
        as the password. Example header: `Authorization: Basic
        MTIzNDU2NzpteS1hcGkta2V5`.

````