PostHog · Schema

CompareFilter

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
compare boolean Whether to compare the current date range to a previous date range.
compare_to string The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` fo
View JSON Schema on GitHub

JSON Schema

posthog-comparefilter-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CompareFilter",
  "title": "CompareFilter",
  "additionalProperties": false,
  "properties": {
    "compare": {
      "default": false,
      "description": "Whether to compare the current date range to a previous date range.",
      "title": "Compare",
      "type": "boolean",
      "nullable": true
    },
    "compare_to": {
      "default": null,
      "description": "The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago.",
      "title": "Compare To",
      "type": "string",
      "nullable": true
    }
  },
  "type": "object"
}