---
title: "UTM parameters"
slug: "utm-parameters"
abstract: "Details on updating UTM parameters in the context object used to describe a related campaign when using Sitecore Search JavaScript SDK for React."
---
# UTM parameters

The context object in a request describes the location and visitor requesting data. The values in the object are used to select which rules are applied during search.

This topic describes how to add Urchin Tracking Module (UTM) parameters to the context object of requests in Sitecore Search JavaScript SDK for React.

The following table lists the UTM parameters used to describe marketing campaigns. If you want to use any of these parameters, you must also include `utm_source`. All of the other parameters are optional.

| Property | Type | Description |
| --- | --- | --- |
| `utm_source` | string | Identifier of the site that sent the traffic.<br><br>Example: *domain.com* |
| `utm_medium` | number | Identifier of the type of link used.<br><br>Example: *ppc*, *cpc*, *banner*, and *email*. |
| `utm_campaign` | number | Identifier of the specific promotion or strategic campaign.<br><br>Example: *spring_sale* |
| `utm_term` | number | List of search terms often separated by a *+* or plus sign.<br><br>Example: *popular+latest* |
| `utm_content` | number | Identifier of what specifically was clicked to bring the user to the site.<br><br>Example: *logolink* and *callToAction*. |

To add UTM parameters as context:

- Use `PageController` to set values, as shown in the following code block.

    ```javascript
    import { PageController } from '@sitecore-search/react';

    const context = PageController.getContext();

    context.setUtmSource('utm source');
    context.setUtmMedium('utm medium');
    context.setUtmCampaign('utm campaign');
    context.setUtmTerm('utm term');
    context.setUtmContent('utm content');
    ```