---
title: Method Calls and Monetate Features Unlocked
slug: js-api/methods-for-targets-action-conditions
description: Descriptions of various Monetate JavaScript API methods required to use certain WHO targets and action conditions
image:  https://archbee-image-uploads.s3.amazonaws.com/ceIfEvQHzQk1IVxoRWUh7/K9eTL4jKm7UQINb6zNziJ-20250912-181225.png
docTags: 
createdAt: 2024-05-01T18:29:51.928Z
---

Each Monetate JavaScript API method offers benefits you can use in the experiences you build. Furthermore, each method you use unlocks more [WHO behavioral targets](https://docs.monetate.com/docs/types-of-who-targets#behavior-targets) under each corresponding section. More targeting options become available as you provide the platform with more data through each method.

The following information includes examples of best practices. If you have any questions, submit them using the Monetate Technical Support portal (support.monetate.com).

## Product-Related Methods

:::hint{type="info"}
Attribute values for products details ([addProductDetails](docId\:zlbUl8IBXhdEaLdjWTMus)), cart, and conversion are stored historically against the customer profile. However, attribute values for products ([addProducts](docId:3PjolBdlNPr_npNubE34U)), page types, and custom variables are not stored and are page-temporal.
:::

:::ExpandableHeading
### addProducts

Use [this method](docId:3PjolBdlNPr_npNubE34U) to add products that the customer views on index or search results pages.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

- **Product list page** > List page includes thumbnails where PID =
- **Product list page** > List page doesn't include thumbnails where PID =
:::

::::ExpandableHeading
### addProductDetails

With [this method](docId\:zlbUl8IBXhdEaLdjWTMus) you can create an experience that targets customers who have viewed a certain product during their current visit. Using it also unlocks advanced [Product Recommendations](https://docs.monetate.com/docs/recommendations) features.

:::hint{type="info"}
The [addProducts](docId:3PjolBdlNPr_npNubE34U) and [addProductDetails](docId\:zlbUl8IBXhdEaLdjWTMus) methods are not limited or tied to product or index page types and can be used to target any page type as long as the relevant product IDs are sent to the platform. These methods *are* tied to the PID information sent to the platform and are independent on the page type sent via the [setPageType](docId\:sMKHQB02vPvMs-RhqI3Iw) method. In the action conditions listed, you can use conditions that require PIDs on any page type. They aren't tied only to index, search, or product page types.
:::

**WHO Targets Unlocked**

- Product viewed
- Product viewed last visit
- Product viewed this visit
- SKU

**Action Conditions Unlocked**

- **Product detail page** > Detail page includes products where PID =
- **Product detail page** > Detail page doesn't include products where PID =
::::

:::ExpandableHeading
### addProductDetails with a Product Catalog

[This method](docId\:zlbUl8IBXhdEaLdjWTMus) allows you to create an experience that targets visitors who have viewed a specific brand or category.

**WHO Targets Unlocked**

- Brand in cart
- Brand last purchased
- Brand purchased
- Brand viewed
- Brand viewed last visit
- Brand viewed this visit
- Category in cart
- Category last purchased
- Category purchased
- Category viewed
- Category viewed last visit
- Category viewed this visit
- Viewed product out of stock

**Action Conditions Unlocked**

- **Product detail page** > Detail page includes products where category =
- **Product detail page** > Detail page doesn't include products where category =
:::

## Site-Related Methods

:::ExpandableHeading
### setPageType

[This method](docId\:sMKHQB02vPvMs-RhqI3Iw) allows you to run an experience on all page types using [action conditions](https://docs.monetate.com/docs/action-conditions).

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

- Page type =
- Page type ≠
:::

:::ExpandableHeading
### addCartRows

[This method](docId\:Y-wcMRn_146QuOtE7NjFt) allows you to create an experience that targets customers who have a certain product or amount in their cart.

**WHO Targets Unlocked**

- Abandoned cart
- Amount in abandoned cart
- Amount in cart
- Average order size
- Product in abandoned cart
- Product in cart
- Quantity in cart

**Action Conditions Unlocked**

- Cart value \<
- Cart value ≤
- Cart value >
- Cart value ≥
:::

:::ExpandableHeading
### addPurchaseRows

[This method](docId\:FNV9UUKQMKGlIdpGCa_5Z) allows you to create an experience that targets customers who have purchased any product in the past.

**WHO Targets Unlocked**

- Days since last purchase
- Last order size
- Product last purchased
- Product purchased
- Product purchased in past days
- Purchase frequency
- Purchased any product
- Purchases in past days

**Action Conditions Unlocked**

None
:::

:::ExpandableHeading
### addConversionRows

[This method](docId:1J1lqhNZRckAmAhPZ79il) allows you to create an experience that targets customers who've completed a non-monetary conversion on your site.

**WHO Targets Unlocked**

- Days since last purchase
- Last order size
- Product last purchased
- Product purchased
- Product purchased in past days
- Purchase frequency
- Purchased any product
- Purchases in past days

**Action Conditions Unlocked**

None
:::

:::ExpandableHeading
### addCategories

[This method](docId\:L1mhr-G5A0rK8Zc3l-_ur) adds page categories that the customer views.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

- Page category contains
- Page category doesn't contain
- Page category =
- Page category ≠
- Page category starts with
- Page category doesn't start with
- Page category ends with
- Page category doesn't end with
:::

:::ExpandableHeading
### addBreadcrumbs

[This method](docId\:pVve37Ya7ozKDXKSn-IeS) adds a site navigation breadcrumb trail for the customer.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

- Page breadcrumb contains
- Page breadcrumb doesn't contain
- Page breadcrumb =
- Page breadcrumb ≠
- Page breadcrumb starts with
- Page breadcrumb doesn't start with
- Page breadcrumb ends with
- Page breadcrumb doesn't end with
:::

:::ExpandableHeading
### addPollForElement

[This method](docId\:CXbW4AVoxZHJFkh15d53Y) adds a delay to the [trackData](docId\:gcm0H169GurCQMv6sBota) call until some element on the page exists.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

None
:::

:::ExpandableHeading
### addSearch

The [Searched and Also Purchased](https://docs.monetate.com/docs/recommendation-algorithms#searched-and-also-purchased) premium recommendation algorithm requires you to implement one or two [addSearch](docId\:Pe7fiV2L53NTpXpwJ4pLA) methods to send customers' search query data for use with a recommendation strategy configured with this recommendation algorithm.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

None
:::

:::ExpandableHeading
### trackData

[This method](docId\:gcm0H169GurCQMv6sBota) sends data that's been pushed to the [monetateQ](docId\:Jt7O1LQ8aUTjhFOLknLnV) array.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

None
:::

:::ExpandableHeading
### trackEvent

[This method](docId\:WRgS0UCDHibkv3ZXwJiYD) indicates an event has occurred on your site.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

None
:::

:::ExpandableHeading
### setDebug

[This method](docId\:iCBq4WKfQA5oNaSrDBfEh) enables debugging for the Monetate JavaScript API so that you can see console errors.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

None
:::

:::ExpandableHeading
### removeDebug

[This method](docId\:He2bdTmNgeNxTXpSx3tAc) disables debugging for the Monetate JavaScript API if you had enabled it with the [setDebug](docId\:iCBq4WKfQA5oNaSrDBfEh) method.

**WHO Targets Unlocked**

None

**Action Conditions Unlocked**

None


:::



