--- title: Attribution at Coveo slug: m1ae0440 canonical_url: https://docs.coveo.com/en/m1ae0440/ collection: coveo-for-commerce source_format: adoc --- # Attribution at Coveo [Coveo for Commerce Advanced Reports](https://docs.coveo.com/en/lbtf7260/) and the [Coveo Merchandising Hub (CMH)](https://docs.coveo.com/en/o5290573/) rely on [attribution](https://docs.coveo.com/en/m7l98577/) to provide insight into the key metrics that affect the performance of your Coveo-powered commerce implementation: * **Transactions** The user's journey is analyzed to determine which [product discovery solutions](https://docs.coveo.com/en/o9cf0524/) should be credited for the purchase. * **Revenue** The user's journey is analyzed to determine which [solutions](https://docs.coveo.com/en/o9cf0524/) should be credited for the revenue that's generated by the purchase. ## Coveo's attribution model A transaction is typically the result of a series of [touchpoints](https://docs.coveo.com/en/o6ha0421/) that map the customer's journey. It's important to consider the entirety of that journey when analyzing the performance of your Coveo-powered commerce implementation. Coveo's [attribution](https://docs.coveo.com/en/m7l98577/) model is _multi-[touchpoint](https://docs.coveo.com/en/o6ha0421/)_, _per-product_, and _last-touch_: * **Multi-[touchpoint](https://docs.coveo.com/en/o6ha0421/)** Transactions and revenue are [attributed](https://docs.coveo.com/en/m7l98577/) to specific [product discovery solutions](https://docs.coveo.com/en/o9cf0524/) rather than to Coveo as a whole. When a click action [touchpoint](https://docs.coveo.com/en/o6ha0421/) leads to a purchase, Coveo uses that [touchpoint](https://docs.coveo.com/en/o6ha0421/) to determine which [solution](https://docs.coveo.com/en/o9cf0524/) should be credited for the purchase. Transactions can be [attributed](https://docs.coveo.com/en/m7l98577/) to multiple [solutions](https://docs.coveo.com/en/o9cf0524/) because each product in a transaction is [attributed](https://docs.coveo.com/en/m7l98577/) individually based on the [touchpoint](https://docs.coveo.com/en/o6ha0421/) involved. > **Note** > > Each transaction is only counted once on the [total transactions chart](https://docs.coveo.com/en/m16b0577#total-transactions-chart) in [Coveo for Commerce Advanced Reports](https://docs.coveo.com/en/lbtf7260/), even if it's [attributed](https://docs.coveo.com/en/m7l98577/) to multiple [solutions](https://docs.coveo.com/en/o9cf0524/). * **Per-product** Each product in a transaction is [attributed](https://docs.coveo.com/en/m7l98577/) to a particular [solution](https://docs.coveo.com/en/o9cf0524/). The transaction as a whole is [attributed](https://docs.coveo.com/en/m7l98577/) to a particular [solution](https://docs.coveo.com/en/o9cf0524/) if at least one product in the transaction can be [attributed](https://docs.coveo.com/en/m7l98577/) to that [solution](https://docs.coveo.com/en/o9cf0524/). > **Transactions vs. revenue** > > Each transaction can only be [attributed](https://docs.coveo.com/en/m7l98577/) to a [solution](https://docs.coveo.com/en/o9cf0524/) once, even when multiple products in the transaction are [attributed](https://docs.coveo.com/en/m7l98577/) to the same [solution](https://docs.coveo.com/en/o9cf0524/). > > However, the revenue for all of the products in a transaction that are [attributed](https://docs.coveo.com/en/m7l98577/) to a particular [solution](https://docs.coveo.com/en/o9cf0524/) is added up and [attributed](https://docs.coveo.com/en/m7l98577/) to that [solution](https://docs.coveo.com/en/o9cf0524/) collectively. * **Last-touch** Each product in a transaction is [attributed](https://docs.coveo.com/en/m7l98577/) to a [solution](https://docs.coveo.com/en/o9cf0524/) based on the last registered click action [touchpoint](https://docs.coveo.com/en/o6ha0421/) involving that product before the purchase was completed. **Example** A user performs a query on a Coveo-powered commerce site. They click a product to open its [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/), but they don't make a purchase and navigate away from the site. Coveo tracks this [touchpoint](https://docs.coveo.com/en/o6ha0421/) as part of the user's journey. Later, they revisit the site and see the same product in a [recommendation slot](https://docs.coveo.com/en/o9b80563/). They click the product to open its [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/), creating another [touchpoint](https://docs.coveo.com/en/o6ha0421/) tracked by Coveo. This time, the user adds the product to their cart and completes the purchase. This product is [attributed](https://docs.coveo.com/en/m7l98577/) to the recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ## Attribution example A customer wants to purchase a laptop with a 12.4" display, a 4k monitor, and a printer, so they visit the Coveo-powered _Acme Electronics_ commerce site. > **Note** > > In this example, the fictional _Acme Electronics_ site doesn't include the ability to [add products to the cart](https://docs.coveo.com/en/o1n93466#cart-events-and-attribution) directly from the search results page, [product listing pages (PLPs)](https://docs.coveo.com/en/m1sf3187/), or [recommendation slots](https://docs.coveo.com/en/o9b80563/). * The customer types `laptop with 12.4 display` in the search bar. In the search results, they see a laptop priced at $500. They click it to open the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/), and after looking at its specifications, they add the laptop to their cart. * Next, the customer finds a 4k monitor priced at $250 on the `Monitors` [product listing page (PLP)](https://docs.coveo.com/en/m1sf3187/). They click it to open the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) and add it to their cart. * The customer then views the products listed on the `Printers` [product listing page (PLP)](https://docs.coveo.com/en/m1sf3187/). They click a printer priced at $200 to open the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) and add it to their cart. * Finally, while the customer is reviewing their cart, they notice a product recommendation for a laptop bag priced at $50. They click the bag to open the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) and add it to their cart. Then the customer proceeds to the payment and completes the purchase. For this customer journey, the transaction is [attributed](https://docs.coveo.com/en/m7l98577/) once to each of the Coveo [product discovery solutions](https://docs.coveo.com/en/o9cf0524/) and once to Coveo overall: * It's [attributed](https://docs.coveo.com/en/m7l98577/) once to the search [solution](https://docs.coveo.com/en/o9cf0524/) because of the [touchpoint](https://docs.coveo.com/en/o6ha0421/) in which the customer clicked the laptop in the search results. * It's [attributed](https://docs.coveo.com/en/m7l98577/) once to the product listing [solution](https://docs.coveo.com/en/o9cf0524/) because of the [touchpoints](https://docs.coveo.com/en/o6ha0421/) in which the customer clicked the monitor and printer on the [product listing pages (PLPs)](https://docs.coveo.com/en/m1sf3187/). Even though two products in this transaction are [attributed](https://docs.coveo.com/en/m7l98577/) to the product listing [solution](https://docs.coveo.com/en/o9cf0524/), the transaction itself is only [attributed](https://docs.coveo.com/en/m7l98577/) once per [solution](https://docs.coveo.com/en/o9cf0524/). * It's [attributed](https://docs.coveo.com/en/m7l98577/) once to the recommendation [solution](https://docs.coveo.com/en/o9cf0524/) because of the [touchpoint](https://docs.coveo.com/en/o6ha0421/) in which the customer clicked the laptop bag in the [recommendation slot](https://docs.coveo.com/en/o9b80563/). * It's [attributed](https://docs.coveo.com/en/m7l98577/) once to Coveo because it includes at least one item that's [attributed](https://docs.coveo.com/en/m7l98577/) to a Coveo [solution](https://docs.coveo.com/en/o9cf0524/). While the transaction is [attributed](https://docs.coveo.com/en/m7l98577/) equally to each [solution](https://docs.coveo.com/en/o9cf0524/) that was involved, the revenue is [attributed](https://docs.coveo.com/en/m7l98577/) based on the price of each product in the transaction. The total of this transaction is $1,000, which is [attributed](https://docs.coveo.com/en/m7l98577/) as follows: * $500 is [attributed](https://docs.coveo.com/en/m7l98577/) to the search [solution](https://docs.coveo.com/en/o9cf0524/). * $450 ($250 + $200) is [attributed](https://docs.coveo.com/en/m7l98577/) to the product listing [solution](https://docs.coveo.com/en/o9cf0524/). * $50 is [attributed](https://docs.coveo.com/en/m7l98577/) to the recommendation [solution](https://docs.coveo.com/en/o9cf0524/). For a more complex example of revenue [attribution](https://docs.coveo.com/en/m7l98577/) involving multiple transactions which include items that aren't [attributed](https://docs.coveo.com/en/m7l98577/) to Coveo, see [Contribution to AOV](https://docs.coveo.com/en/n45g0326#contribution-to-aov). ## Attribution logic Coveo determines [attribution](https://docs.coveo.com/en/m7l98577/) by matching purchase events to click events based on the following criteria: * Both events occurred within 30 days of each other, with the click event preceding the purchase event. * Both events have matching [client IDs](https://docs.coveo.com/en/lbjf0131/). * Both events have matching [tracking IDs](https://docs.coveo.com/en/o8rb0139/). * Both events have matching group IDs or product IDs. ** If both events have matching group IDs, regardless of whether one or both events have product IDs, [attribution is based on the group ID](#group-id-attribution). ** If one or both events lack a group ID, and both events have matching product IDs, [attribution is based on the product ID](#product-id-attribution). The specific event properties differ between the [Event Protocol](https://docs.coveo.com/en/o1n91230/) and [Coveo UA Protocol](https://docs.coveo.com/en/o1n91392/), so the following sections describe the mechanics for each. ### Group ID attribution If the click and purchase events both have matching group IDs, [attribution](https://docs.coveo.com/en/m7l98577/) is based on the group ID. This applies even if both events also have matching product IDs. If your implementation uses the [Event Protocol (EP)](https://docs.coveo.com/en/o9je0592/), the group ID isn't sent directly with the events. Instead, when a [product grouping](https://docs.coveo.com/en/m53g0506#product-groupings) exists, events are enriched by adding the value of the `ec_item_group_id` [field](https://docs.coveo.com/en/200/) from the [catalog data](https://docs.coveo.com/en/obcf0333/). If your implementation uses the Coveo UA Protocol, the events will include the `prNgroup` property, where `N` is based on the number of products included in the event payload. #### Group ID attribution example The following table provides an example in which [attribution](https://docs.coveo.com/en/m7l98577/) would be determined based on the group ID. [%header,cols="6"] |=== |Event type |Timestamp |Client ID |Tracking ID |Group ID |Product ID |Click |`2025-01-01 23:34:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` |`SP00037` |`SP00037_0003` |Purchase |`2025-01-02 00:53:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` |`SP00037` |`SP00037_0003` |=== In this example: * The click event precedes the purchase event, and their timestamps are within 30 days of each other. * Both events have matching [client IDs](https://docs.coveo.com/en/lbjf0131/) and [tracking IDs](https://docs.coveo.com/en/o8rb0139/). * Both events have matching group IDs. * Although both events have matching product IDs, because they also have matching group IDs, the [attribution](https://docs.coveo.com/en/m7l98577/) is based on the group IDs. ### Product ID attribution If either the click event or purchase event (or both) lacks a group ID, and both events have matching product IDs, [attribution](https://docs.coveo.com/en/m7l98577/) is based on the product ID. If your implementation uses the [Event Protocol (EP)](https://docs.coveo.com/en/o9je0592/), the events will include the `productId` property. If your implementation uses the Coveo UA Protocol, the events will include the `prNid` property, where `N` is based on the number of products included in the event payload. #### Product ID attribution example The following table provides an example in which [attribution](https://docs.coveo.com/en/m7l98577/) would be determined based on the product ID. Although neither of these events has a group ID, [attribution](https://docs.coveo.com/en/m7l98577/) would still be based on the product ID if one (but not both) of the events had a group ID. [%header,cols="6"] |=== |Event type |Timestamp |Client ID |Tracking ID |Group ID |Product ID |Click |`2025-01-01 23:34:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` | |`SP00037_0003` |Purchase |`2025-01-02 00:53:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` | |`SP00037_0003` |=== In this example: * The click event precedes the purchase event, and their timestamps are within 30 days of each other. * Both events have matching [client IDs](https://docs.coveo.com/en/lbjf0131/) and [tracking IDs](https://docs.coveo.com/en/o8rb0139/). * Both events have matching product IDs. ### Scenarios with no attribution This section provides examples of scenarios in which Coveo wouldn't match events to determine [attribution](https://docs.coveo.com/en/m7l98577/). . In the following example, the click event precedes the purchase event, and their timestamps are within 30 days of each other. Both events also have matching [client IDs](https://docs.coveo.com/en/lbjf0131/) and [tracking IDs](https://docs.coveo.com/en/o8rb0139/). However, the click event only has a group ID and the purchase event only has a product ID. Because these events don't have a group ID or product ID in common, Coveo won't match these events to determine [attribution](https://docs.coveo.com/en/m7l98577/). [%header,cols="6"] |=== |Event type |Timestamp |Client ID |Tracking ID |Group ID |Product ID |Click |`2025-01-01 23:34:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` |`SP00037` | |Purchase |`2025-01-02 00:53:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` | |`SP00037_0003` |=== . In the following example, both events have matching [client IDs](https://docs.coveo.com/en/lbjf0131/), [tracking IDs](https://docs.coveo.com/en/o8rb0139/), and product IDs. However, the purchase event occurred before the click event, so there's no causal relationship between them. In this case, Coveo won't match these events to determine [attribution](https://docs.coveo.com/en/m7l98577/). [%header,cols="6"] |=== |Event type |Timestamp |Client ID |Tracking ID |Group ID |Product ID |Click |`2025-01-01 23:34:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` | |`SP00037_0003` |Purchase |`2025-01-01 23:23:00 UTC` |`ba7b0985-199d-4e23-b080-1a8ecf099d7a` |`sports` | |`SP00037_0003` |=== ## About search attribution -- ![A click action on a recommended product | Coveo for Commerce](coveo-for-commerce/images/value-reporting/attribution-recommendation.png) Coveo [attributes](https://docs.coveo.com/en/m7l98577/) a product in a transaction to the Recommendation [product discovery solution](https://docs.coveo.com/en/o9cf0524/) if the [visitor](https://docs.coveo.com/en/nbub9475/)’s last registered click action before purchasing the product was selecting it from a [recommendation slot](https://docs.coveo.com/en/o9b80563/). The events that are tracked as part of the user journey differ depending on the protocol you're using ([Event Protocol](https://docs.coveo.com/en/o1n91230/) or [Coveo UA Protocol](https://docs.coveo.com/en/o1n91392/)) and the Coveo API you're making calls to ([Commerce API](https://docs.coveo.com/en/103/) or [Search API](https://docs.coveo.com/en/13/)). For more details about how [attribution](https://docs.coveo.com/en/m7l98577/) is tracked for the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/), see [About recommendation attribution](https://docs.coveo.com/en/m1ae0440#about-recommendation-attribution). The **Recommendation** dashboard shows how Coveo-powered product recommendations have contributed to your key commerce metrics. -- The following diagram illustrates the sequence of events in which Coveo [attributes](https://docs.coveo.com/en/m7l98577/) a product to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/): ![Recommendation attribution sequence | Coveo for Commerce](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/value-reporting/attribution-sequence-recommendation.png) ## Recommendation attribution with Event Protocol The sequence of events is as follows: . pass:q,a[[recommendation slots](https://docs.coveo.com/en/o9b80563/) can appear in different places on a Coveo-powered commerce site. For example, they can appear on home pages, cart pages, or [product detail pages (PDPs)](https://docs.coveo.com/en/n8ad7392/). When a page containing a [recommendation slot](https://docs.coveo.com/en/o9b80563/) loads, a search request is sent to [query](https://docs.coveo.com/en/231/) products to fill the slot. This request] includes the following properties: -- ** `responseId`, which uniquely identifies the initial search request. ** `clientId`, which uniquely identifies a specific instance of a particular browser client. ** [`trackingId`](https://docs.coveo.com/en/n8tg0567/), which uniquely identifies a single user journey through a single [storefront](https://docs.coveo.com/en/p33g0410/). -- After the search request is sent, one or more [recommendation slots](https://docs.coveo.com/en/o9b80563/) load and display the products returned by the request. . When the [visitor](https://docs.coveo.com/en/nbub9475/) clicks a product, the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) loads. A [click event](https://docs.coveo.com/en/o1n92447/) is logged that includes the following properties: -- ** `responseId`, which matches the value of the `responseId` from the search request. This is how Coveo connects the click event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ** `clientId`, which restricts the event sequence to a particular browser client. ** `trackingId`, which restricts the event sequence to a single user journey. ** `productId`, which uniquely identifies the product. ** `name`, the product's name. ** `price`, the product's price. -- The [Coveo Platform](https://docs.coveo.com/en/186/) automatically enriches the click event by adding a value for the `ec_item_group_id` [field](https://docs.coveo.com/en/200/) from the [catalog data](https://docs.coveo.com/en/obcf0333/) if a [product grouping](https://docs.coveo.com/en/m53g0506#product-groupings) exists. It also enriches the `ec_category` and `ec_brand` [fields](https://docs.coveo.com/en/200/). . When the [visitor](https://docs.coveo.com/en/nbub9475/) completes a purchase, a [purchase event](https://docs.coveo.com/en/o1n93059/) is logged that includes the following properties: -- ** `clientId`, which restricts the event sequence to a particular browser client. ** `trackingId`, which restricts the event sequence to a single user journey. ** `transactionId`, which uniquely identifies the transaction. ** `revenue`, the total revenue from the transaction, including tax, shipping, and discounts. -- The purchase event also includes the following properties for each product in the transaction: -- ** `productId`, which uniquely identifies the product. ** `name`, the product's name. ** `price`, the product's price. ** `quantity`, which lists how many of each product were purchased. -- The [Coveo Platform](https://docs.coveo.com/en/186/) automatically enriches the purchase event by adding a value for the `ec_item_group_id` [field](https://docs.coveo.com/en/200/) from the [catalog data](https://docs.coveo.com/en/obcf0333/) if a [product grouping](https://docs.coveo.com/en/m53g0506#product-groupings) exists. It also enriches the `ec_category` and `ec_brand` [fields](https://docs.coveo.com/en/200/). Coveo tracks the `responseId` across the initial search request and click event [touchpoints](https://docs.coveo.com/en/o6ha0421/). If `ec_item_group_id` exists on both the click and purchase event [touchpoints](https://docs.coveo.com/en/o6ha0421/), Coveo uses it to tie the click event to the purchase event that concludes the user journey. If `ec_item_group_id` isn't present in one or both of these events, then Coveo uses `productId` to tie the click event to the purchase event. If the click and purchase event [touchpoints](https://docs.coveo.com/en/o6ha0421/) are within 30 days of each other, Coveo can [attribute](https://docs.coveo.com/en/m7l98577/) this transaction to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ## Recommendation attribution with Coveo UA Protocol The sequence of events is as follows: . pass:q,a[[recommendation slots](https://docs.coveo.com/en/o9b80563/) can appear in different places on a Coveo-powered commerce site. For example, they can appear on home pages, cart pages, or [product detail pages (PDPs)](https://docs.coveo.com/en/n8ad7392/). When a page containing a [recommendation slot](https://docs.coveo.com/en/o9b80563/) loads, a search request is sent to [query](https://docs.coveo.com/en/231/) products to fill the slot. This request] includes the following properties: -- ** `searchUid`, which uniquely identifies the initial search request. ** `clientId`, which uniquely identifies a specific instance of a particular browser client. ** [`trackingId`](https://docs.coveo.com/en/n8tg0567/), which uniquely identifies a single user journey through a single [storefront](https://docs.coveo.com/en/p33g0410/). -- After the search request is sent, one or more [recommendation slots](https://docs.coveo.com/en/o9b80563/) load and display the products returned by the request. A [search event](https://docs.coveo.com/en/n7o80165/) that includes the `searchQueryUid` property is logged. This property is filled with the value of the `searchUid` returned by the search request. This connects the search event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). > **Note** > > All of the events that are tracked for [attribution](https://docs.coveo.com/en/m7l98577/) include the following properties: > > * `clientId`, which restricts the event sequence to a particular browser client. > > * `trackingId`, which restricts the event sequence to a single user journey. . When the [visitor](https://docs.coveo.com/en/nbub9475/) clicks a product, the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) loads. A [click event](https://docs.coveo.com/en/n6mf0358/) that includes the following properties is logged: ** `searchQueryUid`, which is filled with the value of the `searchUid` returned by the search request. This connects the click event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ** `prNid` or `prNgroup` (or both, where `N` is based on the number of products included in the event payload), which links this click event to a particular product and lets Coveo tie this event to the purchase event that concludes the user journey. . When the [visitor](https://docs.coveo.com/en/nbub9475/) completes a purchase, a [purchase event](https://docs.coveo.com/en/l39m0327/) is logged. This purchase event includes the `prNid` or `prNgroup` properties (or both) for each product in the transaction. This connects each product to a particular click event. By tracking the unique `searchUid` and `prNid` or `prNgroup` values used across the [touchpoints](https://docs.coveo.com/en/o6ha0421/) leading up to the purchase, Coveo can [attribute](https://docs.coveo.com/en/m7l98577/) this transaction to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). :leveloffset!: ## About product listing attribution -- ![A click action on a recommended product | Coveo for Commerce](coveo-for-commerce/images/value-reporting/attribution-recommendation.png) Coveo [attributes](https://docs.coveo.com/en/m7l98577/) a product in a transaction to the Recommendation [product discovery solution](https://docs.coveo.com/en/o9cf0524/) if the [visitor](https://docs.coveo.com/en/nbub9475/)’s last registered click action before purchasing the product was selecting it from a [recommendation slot](https://docs.coveo.com/en/o9b80563/). The events that are tracked as part of the user journey differ depending on the protocol you're using ([Event Protocol](https://docs.coveo.com/en/o1n91230/) or [Coveo UA Protocol](https://docs.coveo.com/en/o1n91392/)) and the Coveo API you're making calls to ([Commerce API](https://docs.coveo.com/en/103/) or [Search API](https://docs.coveo.com/en/13/)). For more details about how [attribution](https://docs.coveo.com/en/m7l98577/) is tracked for the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/), see [About recommendation attribution](https://docs.coveo.com/en/m1ae0440#about-recommendation-attribution). The **Recommendation** dashboard shows how Coveo-powered product recommendations have contributed to your key commerce metrics. -- The following diagram illustrates the sequence of events in which Coveo [attributes](https://docs.coveo.com/en/m7l98577/) a product to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/): ![Recommendation attribution sequence | Coveo for Commerce](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/value-reporting/attribution-sequence-recommendation.png) ## Recommendation attribution with Event Protocol The sequence of events is as follows: . pass:q,a[[recommendation slots](https://docs.coveo.com/en/o9b80563/) can appear in different places on a Coveo-powered commerce site. For example, they can appear on home pages, cart pages, or [product detail pages (PDPs)](https://docs.coveo.com/en/n8ad7392/). When a page containing a [recommendation slot](https://docs.coveo.com/en/o9b80563/) loads, a search request is sent to [query](https://docs.coveo.com/en/231/) products to fill the slot. This request] includes the following properties: -- ** `responseId`, which uniquely identifies the initial search request. ** `clientId`, which uniquely identifies a specific instance of a particular browser client. ** [`trackingId`](https://docs.coveo.com/en/n8tg0567/), which uniquely identifies a single user journey through a single [storefront](https://docs.coveo.com/en/p33g0410/). -- After the search request is sent, one or more [recommendation slots](https://docs.coveo.com/en/o9b80563/) load and display the products returned by the request. . When the [visitor](https://docs.coveo.com/en/nbub9475/) clicks a product, the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) loads. A [click event](https://docs.coveo.com/en/o1n92447/) is logged that includes the following properties: -- ** `responseId`, which matches the value of the `responseId` from the search request. This is how Coveo connects the click event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ** `clientId`, which restricts the event sequence to a particular browser client. ** `trackingId`, which restricts the event sequence to a single user journey. ** `productId`, which uniquely identifies the product. ** `name`, the product's name. ** `price`, the product's price. -- The [Coveo Platform](https://docs.coveo.com/en/186/) automatically enriches the click event by adding a value for the `ec_item_group_id` [field](https://docs.coveo.com/en/200/) from the [catalog data](https://docs.coveo.com/en/obcf0333/) if a [product grouping](https://docs.coveo.com/en/m53g0506#product-groupings) exists. It also enriches the `ec_category` and `ec_brand` [fields](https://docs.coveo.com/en/200/). . When the [visitor](https://docs.coveo.com/en/nbub9475/) completes a purchase, a [purchase event](https://docs.coveo.com/en/o1n93059/) is logged that includes the following properties: -- ** `clientId`, which restricts the event sequence to a particular browser client. ** `trackingId`, which restricts the event sequence to a single user journey. ** `transactionId`, which uniquely identifies the transaction. ** `revenue`, the total revenue from the transaction, including tax, shipping, and discounts. -- The purchase event also includes the following properties for each product in the transaction: -- ** `productId`, which uniquely identifies the product. ** `name`, the product's name. ** `price`, the product's price. ** `quantity`, which lists how many of each product were purchased. -- The [Coveo Platform](https://docs.coveo.com/en/186/) automatically enriches the purchase event by adding a value for the `ec_item_group_id` [field](https://docs.coveo.com/en/200/) from the [catalog data](https://docs.coveo.com/en/obcf0333/) if a [product grouping](https://docs.coveo.com/en/m53g0506#product-groupings) exists. It also enriches the `ec_category` and `ec_brand` [fields](https://docs.coveo.com/en/200/). Coveo tracks the `responseId` across the initial search request and click event [touchpoints](https://docs.coveo.com/en/o6ha0421/). If `ec_item_group_id` exists on both the click and purchase event [touchpoints](https://docs.coveo.com/en/o6ha0421/), Coveo uses it to tie the click event to the purchase event that concludes the user journey. If `ec_item_group_id` isn't present in one or both of these events, then Coveo uses `productId` to tie the click event to the purchase event. If the click and purchase event [touchpoints](https://docs.coveo.com/en/o6ha0421/) are within 30 days of each other, Coveo can [attribute](https://docs.coveo.com/en/m7l98577/) this transaction to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ## Recommendation attribution with Coveo UA Protocol The sequence of events is as follows: . pass:q,a[[recommendation slots](https://docs.coveo.com/en/o9b80563/) can appear in different places on a Coveo-powered commerce site. For example, they can appear on home pages, cart pages, or [product detail pages (PDPs)](https://docs.coveo.com/en/n8ad7392/). When a page containing a [recommendation slot](https://docs.coveo.com/en/o9b80563/) loads, a search request is sent to [query](https://docs.coveo.com/en/231/) products to fill the slot. This request] includes the following properties: -- ** `searchUid`, which uniquely identifies the initial search request. ** `clientId`, which uniquely identifies a specific instance of a particular browser client. ** [`trackingId`](https://docs.coveo.com/en/n8tg0567/), which uniquely identifies a single user journey through a single [storefront](https://docs.coveo.com/en/p33g0410/). -- After the search request is sent, one or more [recommendation slots](https://docs.coveo.com/en/o9b80563/) load and display the products returned by the request. A [search event](https://docs.coveo.com/en/n7o80165/) that includes the `searchQueryUid` property is logged. This property is filled with the value of the `searchUid` returned by the search request. This connects the search event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). > **Note** > > All of the events that are tracked for [attribution](https://docs.coveo.com/en/m7l98577/) include the following properties: > > * `clientId`, which restricts the event sequence to a particular browser client. > > * `trackingId`, which restricts the event sequence to a single user journey. . When the [visitor](https://docs.coveo.com/en/nbub9475/) clicks a product, the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) loads. A [click event](https://docs.coveo.com/en/n6mf0358/) that includes the following properties is logged: ** `searchQueryUid`, which is filled with the value of the `searchUid` returned by the search request. This connects the click event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ** `prNid` or `prNgroup` (or both, where `N` is based on the number of products included in the event payload), which links this click event to a particular product and lets Coveo tie this event to the purchase event that concludes the user journey. . When the [visitor](https://docs.coveo.com/en/nbub9475/) completes a purchase, a [purchase event](https://docs.coveo.com/en/l39m0327/) is logged. This purchase event includes the `prNid` or `prNgroup` properties (or both) for each product in the transaction. This connects each product to a particular click event. By tracking the unique `searchUid` and `prNid` or `prNgroup` values used across the [touchpoints](https://docs.coveo.com/en/o6ha0421/) leading up to the purchase, Coveo can [attribute](https://docs.coveo.com/en/m7l98577/) this transaction to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). :leveloffset!: ## About recommendation attribution -- ![A click action on a recommended product | Coveo for Commerce](coveo-for-commerce/images/value-reporting/attribution-recommendation.png) Coveo [attributes](https://docs.coveo.com/en/m7l98577/) a product in a transaction to the Recommendation [product discovery solution](https://docs.coveo.com/en/o9cf0524/) if the [visitor](https://docs.coveo.com/en/nbub9475/)’s last registered click action before purchasing the product was selecting it from a [recommendation slot](https://docs.coveo.com/en/o9b80563/). The events that are tracked as part of the user journey differ depending on the protocol you're using ([Event Protocol](https://docs.coveo.com/en/o1n91230/) or [Coveo UA Protocol](https://docs.coveo.com/en/o1n91392/)) and the Coveo API you're making calls to ([Commerce API](https://docs.coveo.com/en/103/) or [Search API](https://docs.coveo.com/en/13/)). For more details about how [attribution](https://docs.coveo.com/en/m7l98577/) is tracked for the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/), see [About recommendation attribution](https://docs.coveo.com/en/m1ae0440#about-recommendation-attribution). The **Recommendation** dashboard shows how Coveo-powered product recommendations have contributed to your key commerce metrics. -- The following diagram illustrates the sequence of events in which Coveo [attributes](https://docs.coveo.com/en/m7l98577/) a product to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/): ![Recommendation attribution sequence | Coveo for Commerce](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/value-reporting/attribution-sequence-recommendation.png) ## Recommendation attribution with Event Protocol The sequence of events is as follows: . pass:q,a[[recommendation slots](https://docs.coveo.com/en/o9b80563/) can appear in different places on a Coveo-powered commerce site. For example, they can appear on home pages, cart pages, or [product detail pages (PDPs)](https://docs.coveo.com/en/n8ad7392/). When a page containing a [recommendation slot](https://docs.coveo.com/en/o9b80563/) loads, a search request is sent to [query](https://docs.coveo.com/en/231/) products to fill the slot. This request] includes the following properties: -- ** `responseId`, which uniquely identifies the initial search request. ** `clientId`, which uniquely identifies a specific instance of a particular browser client. ** [`trackingId`](https://docs.coveo.com/en/n8tg0567/), which uniquely identifies a single user journey through a single [storefront](https://docs.coveo.com/en/p33g0410/). -- After the search request is sent, one or more [recommendation slots](https://docs.coveo.com/en/o9b80563/) load and display the products returned by the request. . When the [visitor](https://docs.coveo.com/en/nbub9475/) clicks a product, the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) loads. A [click event](https://docs.coveo.com/en/o1n92447/) is logged that includes the following properties: -- ** `responseId`, which matches the value of the `responseId` from the search request. This is how Coveo connects the click event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ** `clientId`, which restricts the event sequence to a particular browser client. ** `trackingId`, which restricts the event sequence to a single user journey. ** `productId`, which uniquely identifies the product. ** `name`, the product's name. ** `price`, the product's price. -- The [Coveo Platform](https://docs.coveo.com/en/186/) automatically enriches the click event by adding a value for the `ec_item_group_id` [field](https://docs.coveo.com/en/200/) from the [catalog data](https://docs.coveo.com/en/obcf0333/) if a [product grouping](https://docs.coveo.com/en/m53g0506#product-groupings) exists. It also enriches the `ec_category` and `ec_brand` [fields](https://docs.coveo.com/en/200/). . When the [visitor](https://docs.coveo.com/en/nbub9475/) completes a purchase, a [purchase event](https://docs.coveo.com/en/o1n93059/) is logged that includes the following properties: -- ** `clientId`, which restricts the event sequence to a particular browser client. ** `trackingId`, which restricts the event sequence to a single user journey. ** `transactionId`, which uniquely identifies the transaction. ** `revenue`, the total revenue from the transaction, including tax, shipping, and discounts. -- The purchase event also includes the following properties for each product in the transaction: -- ** `productId`, which uniquely identifies the product. ** `name`, the product's name. ** `price`, the product's price. ** `quantity`, which lists how many of each product were purchased. -- The [Coveo Platform](https://docs.coveo.com/en/186/) automatically enriches the purchase event by adding a value for the `ec_item_group_id` [field](https://docs.coveo.com/en/200/) from the [catalog data](https://docs.coveo.com/en/obcf0333/) if a [product grouping](https://docs.coveo.com/en/m53g0506#product-groupings) exists. It also enriches the `ec_category` and `ec_brand` [fields](https://docs.coveo.com/en/200/). Coveo tracks the `responseId` across the initial search request and click event [touchpoints](https://docs.coveo.com/en/o6ha0421/). If `ec_item_group_id` exists on both the click and purchase event [touchpoints](https://docs.coveo.com/en/o6ha0421/), Coveo uses it to tie the click event to the purchase event that concludes the user journey. If `ec_item_group_id` isn't present in one or both of these events, then Coveo uses `productId` to tie the click event to the purchase event. If the click and purchase event [touchpoints](https://docs.coveo.com/en/o6ha0421/) are within 30 days of each other, Coveo can [attribute](https://docs.coveo.com/en/m7l98577/) this transaction to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ## Recommendation attribution with Coveo UA Protocol The sequence of events is as follows: . pass:q,a[[recommendation slots](https://docs.coveo.com/en/o9b80563/) can appear in different places on a Coveo-powered commerce site. For example, they can appear on home pages, cart pages, or [product detail pages (PDPs)](https://docs.coveo.com/en/n8ad7392/). When a page containing a [recommendation slot](https://docs.coveo.com/en/o9b80563/) loads, a search request is sent to [query](https://docs.coveo.com/en/231/) products to fill the slot. This request] includes the following properties: -- ** `searchUid`, which uniquely identifies the initial search request. ** `clientId`, which uniquely identifies a specific instance of a particular browser client. ** [`trackingId`](https://docs.coveo.com/en/n8tg0567/), which uniquely identifies a single user journey through a single [storefront](https://docs.coveo.com/en/p33g0410/). -- After the search request is sent, one or more [recommendation slots](https://docs.coveo.com/en/o9b80563/) load and display the products returned by the request. A [search event](https://docs.coveo.com/en/n7o80165/) that includes the `searchQueryUid` property is logged. This property is filled with the value of the `searchUid` returned by the search request. This connects the search event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). > **Note** > > All of the events that are tracked for [attribution](https://docs.coveo.com/en/m7l98577/) include the following properties: > > * `clientId`, which restricts the event sequence to a particular browser client. > > * `trackingId`, which restricts the event sequence to a single user journey. . When the [visitor](https://docs.coveo.com/en/nbub9475/) clicks a product, the [product detail page (PDP)](https://docs.coveo.com/en/n8ad7392/) loads. A [click event](https://docs.coveo.com/en/n6mf0358/) that includes the following properties is logged: ** `searchQueryUid`, which is filled with the value of the `searchUid` returned by the search request. This connects the click event to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). ** `prNid` or `prNgroup` (or both, where `N` is based on the number of products included in the event payload), which links this click event to a particular product and lets Coveo tie this event to the purchase event that concludes the user journey. . When the [visitor](https://docs.coveo.com/en/nbub9475/) completes a purchase, a [purchase event](https://docs.coveo.com/en/l39m0327/) is logged. This purchase event includes the `prNid` or `prNgroup` properties (or both) for each product in the transaction. This connects each product to a particular click event. By tracking the unique `searchUid` and `prNid` or `prNgroup` values used across the [touchpoints](https://docs.coveo.com/en/o6ha0421/) leading up to the purchase, Coveo can [attribute](https://docs.coveo.com/en/m7l98577/) this transaction to the Recommendation [solution](https://docs.coveo.com/en/o9cf0524/). :leveloffset!: