Reference: Analytics Filters
This document provides reference documentation for Moesif’s User and Company analytics filters.
Filter Types
The available filters broadly falls into the following three categories:
You may have more filters available to you outside this document’s scope. For example, for GraphQL APIs, Moesif parses GraphQL queries and automatically generates a secondary set of filters called GraphQL Query filters. For more information, see API Protocol Support.
Search Function
To enter a custom query expression, select the search
as the filter function. This function allows you to search on single terms within your text fields such as a title
or description
field.
The search
function supports the following operators:
-+
to perform a logical AND
operation among the search terms.
|
to perform a logicalOR
operation among the search terms.-
performs a logicalNOT
operation and negates a single search term.
The search
function also supports the following special characters:
-"
wraps a set of search terms.
*
wildcard operator to use at the start or end of any search term.(
and)
to specify operator precedence.
For example, if you want to only match against URI Route that are not /esignature/
, then enter -"/esignature/"
as the search term.
User Filters
Contains filters to query on user analytics and data.
Geo IP
Allows you to filter by geographic location data associated with the user:
City
Country Code
Country
Region
Timezone
User Agent
Contains filters to query user agent data associated with the user:
Build
Device
Major
Minor
Name
OS Major
OS Minor
OS
Patch
Enrichment
Allows you to filter on demographic enrichment data that you have attached on user profiles.
Moesif Enterprise supports demographic enrichment for companies that allows you to add demographic data to customers. For more information, contact us.
Cohort
Allows you to filter on saved cohorts for companies.
Created
The time you created a user profile in Moesif.
First Seen Time
The first time a user accesses your product.
Last Seen Time
The last time a company used your product.
Modified Time
The last time a user profile was modified.
TTFHW
The Time to First Hello World (TTFHW) metric for a user.
User Email
Lets you filter by associated user’s email after setting it in the user metadata.
Name
Lets you filter by associated user’s name after setting it in the user metadata.
User Phone Number
Lets you filter by associated user’s phone number after setting it in the user metadata.
Metadata
User demographics or other properties you store in the user metadata.
Company Id
Allows you to filter for a specific customer by a company ID. This feature requires you to set up company identification using an SDK. Otherwise, you may not get accurate results.
Company
If the user is a member of a company, this object contains the linked company’s data. For more information, see Company Filters.
Campaign
Allows you to filter by HTTP Referer
data and various UTM parameters.
By filtering on the Campaign
object, you can track effectiveness of your acquisition channels. Moesif JavaScript browser SDK automatically sets this object, but not for server side SDKs.
Auth/Session Token
Allows you to filter by all API keys or session tokens a users have used. For more information, see Identification of Users
Initial Request Route
Initial Request Route
refers to the API endpoint the user sent their very first request to. You can use this filter to understand how customers started to use your product.
Company Filters
Contains filters to query on company analytics and data.
Geo IP
Allows you to filter by geographic location data associated with the company:
City
Country Code
Country
Region
Timezone
User Agent
Contains filters to query user agent data associated with the company:
Build
Device
Major
Minor
Name
OS Major
OS Minor
OS
Patch
Enrichment
Allows you to filter on demographic enrichment data that you have attached on company profiles.
Moesif Enterprise supports demographic enrichment for companies that allows you to add demographic data to customers. For more information, contact us.
Subscriptions
Allows you to filter on subscription data for a company.
If you monetize your API, you can use these filters to set up complex business logic for different billing providers such as Chargebee, Recurly, Stripe, and more.
For information about the subscription filters available, see Subscription Filters.
Metadata
User demographics or other properties you store in the company metadata.
Campaign
Allows you to filter by HTTP Referer
data and various UTM parameters.
By filtering on the Campaign
object, you can track effectiveness of your acquisition channels. Moesif JavaScript browser SDK automatically sets this object, but not for server side SDKs.
Auth/Session Token
Allows you to filter by all API keys or session tokens associated with the company. For more information, see How to Track Companies
Cohort
Allows you to filter on saved cohorts for companies.
Company Domain
Lets you filter by company website domains after setting them in the company metadata.
Company Id
Allows you to filter by company IDs.
This feature requires you to set up company identification using an SDK. Otherwise, you may not get accurate results.
Initial Request Route
Initial Request Route
refers to the API endpoint the company sent their very first request to. You can use this filter to understand how customers started to use your product.
Created
The time you created a company profile in Moesif.
First Seen Time
The first time a company accesses your product.
Last Seen Time
The last time a company used your product.
Modified Time
Last time you modified a company’s metadata through UI or API.
TTFHW
The Time to First Hello World (TTFHW) metric for a company.
Subscription Filters
The Subscriptions
filters allow you to filter on various subscription-related data
like subscription status, provider, and so on. You can access these filters by
selecting Company.Subscriptions
.
Subscriptions.balance
Allows you to filter on subscription balance data. The following filters are available:
Subscriptions.balance.available_balance
Subscriptions.balance.current_balance
Subscriptions.balance.has_balance_transaction
Subscriptions.balance.pending_activity
Subscriptions.balance.sequence_id
Subscriptions.cancel_time
The cancellation date for a subscription.
Subscriptions.collection_method
How Stripe processes payments for subscriptions. Corresponds to
Stripe collection_method
.
Subscriptions.company_external_id
The associated Company ID.
Subscriptions.created
The timestamp when the subscription was created.
Subscriptions.currency
The associated currency for a subscription.
Subscriptions.current_period_end
The timestamp marking the end of the current subscription period.
Subscriptions.current_period_start
The timestamp marking the start of the current subscription period.
Subscriptions.internal_modified_time
The timestamp when the subscription changed in Stripe, for example, changed to an active status from trial.
Subscriptions.items
Allows you to filter on various subscription items data, for example, Stripe Subscription Items data. The following filters are available:
items.created_at
items.item_price_id
items.plan
items.plan.created_at
items.plan.id
items.plan.name
items.plan.provider
items.plan.status
items.price
items.price.created_at
items.price.currency
items.price.id
items.price.name
items.price.period_units
items.price.period
items.price.plan_id
items.price.price_in_decimal
items.price.pricing_model
items.price.provider
items.price.status
items.price.tax_behavior
items.price.tiers
items.price.tiers.up_to
items.price.transform_quantity
items.price.transform_quantity.divide_by
items.price.transform_quantity.round
items.price.usage_aggregator
items.price_id
: the price that the subscription is associated withitems.status
: the price that the subscription is associated withitems.subscription_item_id
: the unique identifier for the item as a subscription can contain multiple itemsitems.unit_of_measure
: the unit of measure for the price if the subscription is based usage-based billing.
Subscriptions.metadata
The metadata associated with a subscription.
Subscriptions.modified_time
The timestamp when the subscription changed in Moesif.
Subscriptions.payment_status
The payment status of a subscription.
Subscriptions.provider
The subscription provider, for example, Stripe.
Subscriptions.start_date
The date when the subscription was first created. It might differ from
Subscriptions.created
due to backdating.
Subscriptions.status
The status of the subscription:
active
canceled
pending
trialing
draft
future
Subscriptions.subscription_id
The ID of the subscription.
Event Filters
The event filters allow you to filter on event data.
These filters fall into four catagories:
Request Filters
Request
filters allow you to filter on HTTP request data including headers.
Request.Geo IP
Allows you to filter by geographic location data with the following filters:
City
Country Code
Country
Region Code
Region
Timezone
Request.User Agent
Contains filters to query user agent data:
Build
Device
Major
Minor
Name
OS Major
OS Minor
OS
Patch
Request.Body
Contains filters to query data from a HTTP request body.
Request.URI Segments
Allows you to filter on URI segments. Moesif assigns zero-based numbers to the URI segments. Therefore, the first URI segment has the number 0
, and so on.
Request.Headers
Allows you to filter on HTTP request headers.
Request.API Version
If you configured the API version in your Moesif server integration, you can filter on the version.
Request.Content Length
Corresponds to the Content-Length
HTTP request header.
Request.Content Type
Corresponds to the Content-Type
HTTP request header.
Request.IP Address
The IP address of the user agent making a request. Moesif only supports IPv4 addresses.
Request.Time
The request time.
Request.URI Raw
The raw URI that was requested.
Request.URI Route
The path components of the URI—for example, https://myblog.com/posts
contains the /posts
route.
Request.Verb/Method
Allows you to filter on the HTTP request methods.
Response Filters
Response
filters allow you to filter on HTTP response data including headers.
Response.Body
Contains filters to query data from a HTTP response body.
Response.Headers
Allows you to filter on HTTP response headers.
Response.Status Code
Allows you to filter on the HTTP response status codes.
Metadata Filters
The Metadata
filter allows you to filter on custom metadata you set using event metadata.
Common filters
The following common filters are available outside the preceding three event filter types:
Tag
Allows you filter by event tags.
Action Name
Lets you filter by custom actions.
Auth/Session Token
The authentication or session token used when making API calls—for example, credentials in the Authorization
HTTP request header. For more information, see Identification of Users and How to Track Companies.
Elapsed Duration
Lets you filter by the API request duration in milliseconds. The elapsed duration means the time elapsed between the API request and the server response.
id
Moesif assigns a unique ID to each API call called an event ID. If you know the event ID—for example, you can use it here as a filter.
Event Type
Allows you to filter by the event type: API Calls or Actions.
Request Direction
This filter applies to API Calls only and allows you to filter by the direction of API requests.
A value of Incoming
shows only API calls to your own services you provide. A value of Outgoing
only shows API calls going out to a third-party service.