---
title: Use DO_NOT_TRACK widget per-page type
slug: product-recommendations/docs/use-do-not-track-widget-per-page-type
docTags: 
createdAt: 2026-07-30T20:41:31.037Z
---

You can configure and support multiple `DO_NOT_TRACK` (DNT) [widgets](docId\:Oelgq9EycADCNJ2Oj5Yut) for different page types in your site in Optimizely Product Recommendations. With a dedicated DNT widget tailored for each page type (like home, category, product, or custom pages), you can enjoy enhanced privacy compliance, improved widget management, and greater flexibility for complex site structures.   

## Page type parameter

The tracking request requires a `type` parameter, which specifies the page type, like home, category, product, or custom pages. For standard pages, pass the following parameter, without passing the `customPageName` parameter:

```auto
type=[pageName]
```

For custom pages, pass the following parameters: 

```auto
type=other
```

```auto
customPageName=[customPageName]
```

If the `type` parameter is missing or invalid, the system returns a **400 Bad Request** status. If `type` is `other` for a custom page, and `customPageName` is missing or invalid, the system returns a **400 Bad Request** status again.

## Widget management

Page type differentiates DNT widgets, letting you use multiple widgets with the same name like `DO_NOT_TRACK` but associated with different page types. This reduces the risk of naming errors and simplifies widget management.

:::hint{type="info"}
**Note**

You must update existing implementations to include the new parameters in tracking requests to ensure correct widget behavior.
:::

## Example tracking request

See the following example tracking request for a page type:

```auto
fetch("https://site.eu1.productrecs.optimizely.com/tracker/genericRecs.page?loc=en-GB&type=home, { method: 'GET'}).then(response => response.json()) .then(data => console.log(data)) .catch(err => console.error('error', err));
```

For custom pages:

```auto
fetch("https://site.eu1.productrecs.optimizely.com/tracker/genericRecs.page?loc=en-GB&type=other&customPageName=myCustomPage, { method: 'GET'}).then(response => response.json()) .then(data => console.log(data)) .catch(err => console.error('error', err));
```
