Using Tag Filters

Learn about the use of on-the-fly tag filtering in exports

Khoros allows native tag filtering in analytics export operations performed via the API. This empowers companies to initiate on-the-fly tag-filtered exports of analytical data, filtered by tags, without having to create a Smart View to do so.

📘

If both a smart view and tag filters are specified, the Smart View will take priority if tags are present as part of the Smart View and any tag filters in the request are ignored.

For API users, all export API endpoints include the following parameters.

  • tagsAll: must have all of these tags
  • tagsNone: must not have any of these tags
  • tagsAny [multiple parameters allowed]: must have any of these tags

Discover Available Tags

The following API endpoint enables you to retrieve a list of available tags that can be used in the tags filter.

https://[RESPONSE-DOMAIN]/api/v2/tags

Generate an Export Using Tag Filtering

In order to demonstrate the tags filter in action, let's create a scenario where we want to generate an analytics export with multiple identified tags in order to focus on data that meet our specific criteria.

In our example, add tag filters to a typical export request. These tags apply the following filter properties to the export:

  • Results must include tags 1 and 2.
  • Results must not include tag 10.
  • Results must include one or both of the following tags: 100 or 101.
  • Results must include one or both of the following tags: 200 or 201.

You can use multiple tagsAny parameters to filter through multiple, separate lists of tags.

Here's what that query looks like as part of a request:

&tagsAll=1,2&tagsNone=10&tagsAny=100,101&tagsAny=200,201

Did this page help you?