For the complete documentation index, see llms.txt. This page is also available as Markdown.

Filters Reference

Analytics endpoints (POST /analytics/resource/{experienceId} and the POST /analytics/sitewide/* endpoints) accept a filters parameter to narrow the result data as a JSON object in the request body.

The deprecated GET /analytics/resource/{experienceId} endpoint does not accept the new filters contract. It remains available only during the beta for the original query-parameter shape and will be removed when the beta version ends.

All filter fields are optional. Omit a field or set it to null to skip that filter.

Dimension Filters

Field
Type
Description

deviceType

string

"any", "mobile", or "desktop"

visitorType

string

"any", "new", or "returning"

countryCodes

string[]

ISO 3166-1 alpha-2 codes, e.g. ["US", "GB"]

sourceSitesOrChannels

string[]

Traffic channel names (see list below)

Available traffic channels: Instagram, Facebook, Google, Twitter, TikTok, Youtube, Klaviyo, Attentive, Postscript, Paid Shopping, Paid Search, Paid Social, Paid Video, Display, Paid Other, Organic Shopping, Organic Social, Organic Video, Organic Search, Other, Referral, Affiliate, SMS, Email, Direct

These 25 values are the complete accepted set; any other value is rejected with a 400. Omit sourceSitesOrChannels or pass an empty array to include all channels — there is no any sentinel.

Page & URL Filters

Field
Type
Description

landingPageFilters

array

Preferred landing-page filter. Array of { filterType: operator, values: string[] } items. Values within one item are OR'd; items are combined per landingPageFiltersOperator.

landingPageFiltersOperator

string

How landingPageFilters items are combined: or (default — matches any item) or and (must match every item).

landingPage

object

Deprecated — use landingPageFilters. Still accepted for backwards compatibility. { landingPageUrlPath: string, landingPageUrlPathFilterType: operator }

landingPageTypes

array

Restrict to sessions whose landing page is one of these page types: "PDP", "Collection", "Content", "Blog", "Homepage", "Search", "Cart", "Other". Omit or null for all types.

urlParam

object

{ queryParam: string, queryParamValue: string, queryParamFilterType: operator }

Match operators for landingPageFilters[].filterType and the deprecated landingPageUrlPathFilterType: equals, contains, startsWith, endsWith, doesNotEqual, doesNotContain, doesNotStartWith, doesNotEndWith, isNull, isNotNull (omit values for isNull/isNotNull)

Match operators for queryParamFilterType: the same set as above (set queryParamValue to null for isNull/isNotNull)

Operator / value pairing

Each operator either takes a value or matches on its absence, and sending a mismatched pair is a 400 validation error — it is not silently ignored:

Filter

With equals and the other 7 value operators

With isNull / isNotNull

landingPageFilters[]

values must hold at least one non-empty string. Omitted, [], or blank-only entries are rejected.

Omit values. An empty array is accepted; real values are rejected.

landingPage (deprecated)

landingPageUrlPath must be a non-empty string.

Leave landingPageUrlPath as null.

urlParam

queryParam and queryParamValue must both be non-empty.

queryParam must be non-empty; leave queryParamValue as null.

A value with no operator is also rejected — e.g. landingPageUrlPath set while landingPageUrlPathFilterType is null, or any urlParam field set while queryParamFilterType is null.

To apply no filter at all, omit the whole object (or leave every field null). That remains valid.

These pairings are enforced at request validation but cannot be expressed in the OpenAPI schema, which describes each field independently — so rely on this table rather than on the generated field types.

User Behavior Filters

Field
Type
Description

userBehavior

object

{ viewedCheckout?: boolean, addedToCart?: boolean, viewedProductPage?: boolean, viewedCollectionPage?: boolean }

The reachedCheckoutStage filter and its allowed values are documented per-endpoint in each endpoint's request schema (auto-generated from the source enum), so they are not duplicated here.

Revenue & Order Filters

Field
Type
Description

minNetRevenue

number

Minimum order net revenue (inclusive)

maxNetRevenue

number

Maximum order net revenue (inclusive)

minShippingRevenue

number

Minimum shipping revenue (inclusive)

maxShippingRevenue

number

Maximum shipping revenue (inclusive)

shippingMethods

string[]

Shipping method names to include

currencyCodes

string[]

ISO 4217 order currency codes, e.g. ["USD", "EUR"]

currencyCodesFilterType

string

"include" (default) or "exclude" — how currencyCodes is matched

maxZScore

number | null

Outlier Z-score threshold; null disables filtering

Custom Events Filters

Field
Type
Description

triggeredCustomEvents

string[]

Custom event identifiers. You can find the id for your custom event in the GET https://api.intelligems.io/v25-10-beta/experiences/{experienceId} payload.

customEventsFilterType

string

"any" (at least one), "all" (every event), "none" (none of the events)

Product Filters

Field
Type
Description

experimentProductsOnly

boolean

Only include products in the experiment (experience analytics only)

onlyProductIds

string[]

Restrict to orders containing at least one of these Shopify product IDs (numeric strings). Available for both experience and sitewide analytics.

onlyProductHandles

string[]

Shopify product handles to include (experience analytics only)

Advanced Targeting

Field
Type
Description

pageTargeting

array

Expression groups for page-level targeting

productTargeting

array

Expression groups for product-level targeting

applyExperienceTargetingExperienceId

UUID

Reuse targeting config from an existing experience

Page targeting — each group has type (one of: utm, url, urlPath, device, visitor, trafficSource, country, referrer, cookie, klaviyo, landingPage) and queries array. Each query: { key: string, value: string, filter: matchOperator, type: filterType }.

Product targeting — each group has type (one of: productId, collection, tag, price, inventory) and queries array. Each query: { key: productAttribute, value: string | number, filter: productOperator, type: productAttribute }. Product operators: includes, doesNotInclude, greaterThan, lessThan.

Example Filter Object

For the resource and sitewide POST endpoints, send the filter object directly in the JSON body under filters.

Last updated

Was this helpful?