# parcelLab Product Recommendations

## Overview

You can display product recommendations in emails, on your <code class="expression">space.vars.Product\_OrderStatus</code>, and <code class="expression">space.vars.Product\_ReturnsPortal</code> as part of your campaigns set in <code class="expression">space.vars.Product\_Campaigns</code>. The parcelLab recommendation engine uses the article data that you send in order to display products based on the items in the basket that are most likely to be purchased together. When customers click a product image from the list of recommended items, they will be navigated to the specific product page.

{% hint style="info" %}
If the relevant article information is not available to show related products, the recommendation will default to a series of items that are considered best sellers.
{% endhint %}

<div align="left"><figure><img src="/files/GlSNBGYn9iHj4zZp5RFo" alt="Product recommendations highlighted on the Order Status page" width="563"><figcaption></figcaption></figure></div>

### Key Benefits

By providing product recommendations in your communications, you can provide customers with relevant promotional content related to their interests and improve their experience with your brand.

With the product recommendation content block in <code class="expression">space.vars.Product\_Campaigns</code>, you can choose to display up to 10 products to showcase items that are likely to be purchased together or are best sellers to enhance customer engagement and retention rates.

## Configuring Product Recommendations

The following section describes the configuration required for product recommendations.

### Customer Requirements

To integrate product recommendation in your communications, you need to provide the relevant article data to parcelLab as specified below.

#### Article Data for v4 Data Model

The following article data is required to use with the v4 data model.

{% hint style="info" %}
For more information, see our [v4 data model documentation](/docs/developers/data-elements/data-model.md#article-list).
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Required</strong></td><td><ul><li>article_name</li><li>SKU</li><li>article_image_url</li><li>article_store_url</li></ul></td></tr><tr><td><strong>Optional</strong></td><td><ul><li>article_category</li><li>unit_price</li><li>quantity</li><li>size</li><li>color</li></ul></td></tr></tbody></table>

#### Article Data for v2 Data Model

The following article data is required to use with the v2 data model.

{% hint style="info" %}
For more information, see our [v2 data model documentation](/docs/developers/v2/data-elements/data-model.md#article-list).
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Required</strong></td><td><ul><li>articleName</li><li>articleNo</li><li>articleImageUrl</li><li>articleUrl</li></ul></td></tr><tr><td><strong>Optional</strong></td><td><ul><li>articleCategory</li><li>articlePrice</li><li>quantity</li><li>size</li><li>color</li></ul></td></tr></tbody></table>

You can then complete the following setup to add product recommendations to your communications in the <code class="expression">space.vars.Product\_Campaigns</code> module in the <code class="expression">space.vars.Product\_App</code>:

* Create your campaign and set the relevant details (for example: target audience and start and end dates) or edit an existing campaign.
* Select to add product recommendations for emails, your <code class="expression">space.vars.Product\_OrderStatus</code>, and/or your <code class="expression">space.vars.Product\_ReturnsPortal</code>.
* Set a return threshold in order to exclude products with a higher return rate than this.

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This parameter only functions for customers that use the parcelLab Returns Portal as article level return rates are required to filter recommendations.</p></div>
* Choose to display up to 10 product recommendations in the selected communication type.
* Select whether to display product recommendations at the top or bottom of the <code class="expression">space.vars.Product\_OrderStatus</code> or <code class="expression">space.vars.Product\_ReturnsPortal</code> page.
* UTM parameters are automatically added to enable monitoring when specific products are clicked. If you have set up custom UTM parameters these will not be overridden and therefore you may not benefit from automatic tracking. In addition to our standard UTMs, the `&utm_content` is set to `recommendation`.

When product recommendations are configured in the <code class="expression">space.vars.Product\_Campaigns</code> module in the <code class="expression">space.vars.Product\_App</code>, recommended items will display in your communications for scheduled campaigns with no further setup required.

## Tracking On-Site User Engagement in Google Analytics

When recommendations are shown on the [Order Status page](/docs/engage/order-status-page.md) or within the [Returns Portal](/docs/retain/returns-portal.md), the GTAG fires upon click, sending a structured `recommendation_click` event directly to Google Analytics 4 (GA4).

This is required for accurate attribution, as the on-site traffic source will already be set by the UTMs at the point that traffic reaches the site, so any attribution for on-site recommendation clicks must be handled by Google’s GTAG.

The event is fired with the following parameters that can be used to analyze engagement with product recommendations.

| Parameter                                   | Description                                                                                                                    |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `item_id`, `item_name`, and `item_category` | Identifies the product shown in the recommendation                                                                             |
| `position`                                  | The index of the product within the recommendation carousel or list                                                            |
| `section`                                   | Where the click occurred (that is: `order_status_page` or `returns_portal`)                                                    |
| `page_location` and `page_referrer`         | Standard GA context fields                                                                                                     |
| `ep.app_name`                               | Always set to `parcellab` to identify the origin                                                                               |
| `ep.screen_name`                            | Indicates the context (for example: `track_and_trace` for the <code class="expression">space.vars.Product\_OrderStatus</code>) |
| `ep.content_type`                           | Set to `product_recommendation` for all recommended product clicks                                                             |
| `ep.content_id`                             | The name or SKU of the clicked product                                                                                         |

### Customer Requirements

To track user engagement from using the Product Recommendations feature, you must meet the following requirements:

* <code class="expression">space.vars.Product\_OrderStatus</code> and/or <code class="expression">space.vars.Product\_ReturnsPortal</code> embedded on your website
* GA4 configured for your website

### Viewing Product Recommendation Clicks in GA4

To view the tracked events in GA4:

1. Log in to [Google Analytics](https://analytics.google.com/).
2. Navigate to **Reports** > **Realtime overview**.
3. In the Event count by Event name card, click on the `recommendation_click` event.

   <div align="left"><figure><img src="/files/EXVMhQUYo6ubRHAr38OZ" alt="Event count by event name card" width="160"><figcaption></figcaption></figure></div>

   From this view, you can see the event parameters that are sent with the event.

   <div align="left"><figure><img src="/files/t8F6zvbPUxv0QyxjS5Tp" alt="Event parameters sent with recommendation_click event" width="149"><figcaption></figcaption></figure></div>

{% hint style="success" %}

* Use the `section` parameter to distinguish between clicks on the Order Status page and <code class="expression">space.vars.Product\_ReturnsPortal</code>
* Use the `position` parameter to analyze product ranking performance
* For deeper analysis, navigate to **Explore** > **Free Form** to build a custom report and visualize the following:
  * Top-performing products by click volume
  * Conversion correlation with recommendation clicks
  * Engagement by device, geography, or session source
    {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parcellab.com/docs/engage/campaigns/parcellab-product-recommendations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
