---
title: "clickthrough"
method: POST
path: "/{siteId}/recommendations/clickthrough"
tags: ["Recommendations"]
---

# clickthrough

`POST /{siteId}/recommendations/clickthrough`

<i>/beacon/v2/{siteId}/recommendations/clickthrough</i><br><br>Shopper clicks on a rendered Searchspring personalized recommended result, and is taken to the product detail page (PDP).

## Path parameters

- `siteId` string, required

## Request body

- RecommendationsClickthroughSchema
  - `context` Context, required — Contextual data about the event
    - `IP` string — Shoppers IP address. Accepts IPv4 and IPv6 formats. Recommended this is passed for accuracy. If not, will attempt to default to the "x-forwarded-for" or the Remote Address.
    - `userAgent` string — Shoppers UserAgent. Recommended this is passed for accuracy. If not, will attempt to default to "user-agent" request header.
    - `timestamp` string, required — RFC3339 formatted timestamp represents time of event
    - `pageUrl` string, required — Current page `window.location.href` value
    - `userId` string, required — Unique identifier for the customer (usually a UUID)
    - `sessionId` string, required — Unique identifier for the customer's current session - should expire after store visit (usually a UUID)
    - `pageLoadId` string, required — Unique identifier that represents a unique page load. Used to tie multiple events made on a single page together.
    - `shopperId` string — Unique identifier for the customer's product personalization - it is typically a user id or email and should be sent if the user is authenticated on the storefront. If the shopper has already logged in this is required.
    - `initiator` string, required — Application identifier that initiated the event
    - `attribution` object[] — Provides attribution details on product landing pages - it is currently only used for email recommendations
      - `type` string, required
      - `id` string, required
    - `currency` Currency — Active currency type on the site
      - `code` string — currency code in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html#:~:text=The%20first%20two%20letters%20of,and%20the%20D%20for%20dollar.) format
    - `dev` boolean — Developer mode flag. If set to `true`, the event data will not populate in reporting
  - `data` union, required — Event details
    - object
      - `tag` string, required — Tag of the personalized recommendation profile the shopper interacted with
      - `responseId` string, required — Unique ID returned in each API response
      - `results` union[], required — List of tracked result(s). Can be a result that is either a product or a banner.
        - union
          - object — Describes a tracked result.
            - `type` 'product' | 'banner', required — Defines the type of item tracked.
            - `parentId` string, required — Unique product identifier of the parent product interacted with
            - `uid` string, required — Unique product identifier of the product interacted with
            - `sku` string — SKU of the product interacted with
          - object — Describes a tracked inline banner.
            - `type` 'product' | 'banner', required — Defines the type of item tracked.
            - `uid` string, required — Unique product identifier of the product interacted with
    - object
      - `tag` string, required — Tag of the personalized recommendation profile the shopper interacted with
      - `responseId` string, required — Unique ID returned in each API response
      - `banners` object[], required — List of banners UID's returned in the API response. An empty array will indicate zero banners were returned in the API response.
        - `uid` string, required — Unique identifier of the banner

## Response `200`

OK

- object
  - `success` boolean — Data sent and received

## Other responses

- `400` — Bad request
- `404` — Invalid path
- `405` — Invalid request method
- `413` — Payload too large
- `415` — Unsupported media type
- `500` — Internal server error

---

[API](https://skmtc.dev/searchspring/apis/autocomplete-module.md) · [All operations](https://skmtc.dev/searchspring/apis/autocomplete-module/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/searchspring/autocomplete-module/revisions/04129662b4e5/schema)
