# Comparison of Targeting Conditions in Audiences, Front-end, and API Campaigns

[**Full Description of Targeting Conditions in Audiences**](/lang/en/platform-interface/audience-targeting-conditions.md)

[**Full Description of Targeting Conditions in Front Campaigns and API Campaigns**](/lang/en/general-information/targeting-conditions-definition-and-their-applicability.md)

<table data-full-width="true"><thead><tr><th width="154">Condition</th><th width="114">Audiences</th><th width="164">Front Campaigns</th><th width="148">API Campaigns</th><th>Comments</th></tr></thead><tbody><tr><td>Who / Audience</td><td>+</td><td>+</td><td>+</td><td></td></tr><tr><td>Who / Browser</td><td>+</td><td>+</td><td>+</td><td>Determined by script for front implementation; determined based on the value in <mark style="color:red;"><code>context.device.userAgent</code></mark> for API implementation</td></tr><tr><td>Who / Traffic source</td><td>+</td><td>+</td><td>+</td><td>Determined by script for front implementation; determined based on <mark style="color:red;"><code>context.page.referrer</code></mark> for API implementation</td></tr><tr><td>Who / Device category</td><td>+</td><td>+</td><td>+</td><td>Determined by script for front implementation; determined based on the value in <mark style="color:red;"><code>context.device.userAgent</code></mark> for API implementation</td></tr><tr><td>Who / Country</td><td>+</td><td>+</td><td>+</td><td>For front implementation, value is taken from a dictionary based on country code. For API implementation, determined based on the user's IP passed in <mark style="color:red;"><code>context.device.ip</code></mark></td></tr><tr><td>Who / Region</td><td>+</td><td>+</td><td>+</td><td>For front implementation, value is taken from a dictionary based on country code. For API implementation, determined based on the user's IP passed in <mark style="color:red;"><code>context.device.ip</code></mark></td></tr><tr><td>Who / City</td><td>+</td><td>+</td><td>+</td><td>For front implementation, the value is taken from a dictionary based on country code. For API implementation, determined based on the user's IP passed in <mark style="color:red;"><code>context.device.ip</code></mark></td></tr><tr><td>Who / Number of Pageviews</td><td>+</td><td>+</td><td>+</td><td>Works within a session for targeting and according to audience window for audiences</td></tr><tr><td>Who / New user</td><td>+</td><td>+</td><td>-</td><td></td></tr><tr><td>Who / Cookie</td><td>-</td><td>+</td><td>-</td><td></td></tr><tr><td>Who / URL visit</td><td>+</td><td>+</td><td>+</td><td>Works within a session for targeting and according to audience window for audiences</td></tr><tr><td>Who / Products added to cart</td><td>+</td><td>+</td><td>+</td><td>Works within a session for targeting and according to audience window for audiences</td></tr><tr><td>Who / Products viewed</td><td>+</td><td>+</td><td>+</td><td>Works within a session for targeting and according to audience window for audiences</td></tr><tr><td>Who / Products purchased</td><td>+</td><td>+</td><td>+</td><td>Works within a session for targeting and according to audience window for audiences</td></tr><tr><td>Who / Custom Attribute</td><td>-</td><td>-</td><td>+</td><td>Works similarly to "<mark style="color:green;"><strong>Where</strong></mark> / Custom evaluator" in Front campaigns</td></tr><tr><td>Who / Event Trigger</td><td>+</td><td>+</td><td>+</td><td></td></tr><tr><td>Who / Event Trigger By Property</td><td>+</td><td>+</td><td>+</td><td></td></tr><tr><td>Where / Page URL</td><td>-</td><td>+</td><td>+</td><td>Can be used in combination with the "ignore URL parameters" function, i.e., without considering URL parameters for targeting</td></tr><tr><td>Where / Page type</td><td>-</td><td>+</td><td>+</td><td>According to page context</td></tr><tr><td>Where / Category page</td><td>-</td><td>+</td><td>+</td><td></td></tr><tr><td>Where / Product page</td><td>-</td><td>+</td><td>+</td><td></td></tr><tr><td>Where / Product popularity (views)</td><td>-</td><td>+</td><td>-</td><td></td></tr><tr><td>Where / Product popularity (purchases)</td><td>-</td><td>+</td><td>-</td><td></td></tr><tr><td>Where / Custom evaluator</td><td>-</td><td>+</td><td>-</td><td>Works similarly to "<mark style="color:green;"><strong>Who</strong></mark> / Custom Attribute" in API campaigns</td></tr></tbody></table>


---

# 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://developer.gravityfield.ai/lang/en/general-information/comparison-of-targeting-conditions-in-audiences-front-end-and-api-campaigns.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.
