:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(customer-analytics): add link custom properties (#90262)
Arthur Moreira de Deus1f229c80c081
diff --git a/posthog/settings/web.py b/posthog/settings/web.pyindex 44c8de01bef1..877735a0f496 100644--- a/posthog/settings/web.py+++ b/posthog/settings/web.py@@ -786,6 +786,7 @@ SPECTACULAR_SETTINGS = {"LoopTriggerTypeEnum": ["schedule", "github", "api"],"CustomPropertyDisplayTypeEnum": ["text",+ "link","number","currency","percent",diff --git a/products/customer_analytics/backend/constants.py b/products/customer_analytics/backend/constants.pyindex 24c74009e4a3..6256e7b7a054 100644--- a/products/customer_analytics/backend/constants.py+++ b/products/customer_analytics/backend/constants.py@@ -25,6 +25,7 @@ BILLING_SPEND_INSIGHT_SHORT_IDS = ["o4I9sdFE", "Tjo4bsux"]CUSTOM_PROPERTY_DISPLAY_TYPE_CHOICES = ["text",+ "link","number","currency","percent",diff --git a/products/customer_analytics/backend/logic/custom_property_values.py b/products/customer_analytics/backend/logic/custom_property_values.pyindex 2b13afa49908..bdfd0846b16d 100644--- a/products/customer_analytics/backend/logic/custom_property_values.py+++ b/products/customer_analytics/backend/logic/custom_property_values.py@@ -12,6 +12,7 @@ from typing import Anyfrom uuid import UUIDfrom django.core.exceptions import ValidationError+from django.core.validators import URLValidatorfrom django.db import IntegrityError, transactionfrom django.utils import timezone@@ -30,6 +31,7 @@ from products.customer_analytics.backend.models import (from products.customer_analytics.backend.models.custom_property_value import ACTIVE_VALUE_CONSTRAINT_NAMECoercedValue = float | bool | str | datetime+_LINK_VALIDATOR = URLValidator(schemes=["http", "https"])class InvalidCustomPropertyValue(ValueError):@@ -429,6 +431,15 @@ def _coerce_string(definition: CustomPropertyDefinition, value: Any) -> str:raise InvalidCustomPropertyValue(_expects(definition, "a text value"))+def _coerce_link(definition: CustomPropertyDefinition, value: Any) -> str:+ link = _coerce_string(definition, value)+ try:+ _LINK_VALIDATOR(link)+ except ValidationError:+ raise InvalidCustomPropertyValue(_expects(definition, "an HTTP or HTTPS URL"))+ return link++def _coerce_select(definition: CustomPropertyDefinition, value: Any) -> str:labels = [option["label"] for option in definition.options or []]if isinstance(value, str) and value in labels:@@ -449,6 +460,8 @@ _HANDLER_BY_DATA_TYPE: dict[DataType, tuple[str, Callable[[CustomPropertyDefinitdef _coerce_to_column(definition: CustomPropertyDefinition, value: Any) -> tuple[str, CoercedValue]:if definition.display_type == DisplayType.SELECT:return "value_str", _coerce_select(definition, value)+ if definition.display_type == DisplayType.LINK:+ return "value_str", _coerce_link(definition, value)column, coerce = _HANDLER_BY_DATA_TYPE[definition.data_type]return column, coerce(definition, value)diff --git a/products/customer_analytics/backend/migrations/0045_custom_property_definition_link_display_type.py b/products/customer_analytics/backend/migrations/0045_custom_property_definition_link_display_type.pynew file mode 100644index 000000000000..2c356fcb0ce5--- /dev/null+++ b/products/customer_analytics/backend/migrations/0045_custom_property_definition_link_display_type.py@@ -0,0 +1,33 @@+# Generated by Django 5.2.17 on 2026-08-26 19:36++from django.db import migrations, models++import products.customer_analytics.backend.models.custom_property_definition+++class Migration(migrations.Migration):+ dependencies = [+ ("customer_analytics", "0044_custom_property_sync_run_temporal_run_id"),+ ]++ operations = [+ migrations.AlterField(+ model_name="custompropertydefinition",+ name="display_type",+ field=models.CharField(+ choices=[+ ("text", "text"),+ ("link", "link"),+ ("number", "number"),+ ("currency", "currency"),+ ("percent", "percent"),+ ("date", "date"),+ ("datetime", "datetime"),+ ("boolean", "boolean"),+ ("select", "select"),+ ],+ default=products.customer_analytics.backend.models.custom_property_definition.DisplayType["TEXT"],+ max_length=20,+ ),+ ),+ ]diff --git a/products/customer_analytics/backend/migrations/max_migration.txt b/products/customer_analytics/backend/migrations/max_migration.txtindex fb38ebe404a2..886c31c69a57 100644--- a/products/customer_analytics/backend/migrations/max_migration.txt+++ b/products/customer_analytics/backend/migrations/max_migration.txt@@ -1 +1 @@-0044_custom_property_sync_run_temporal_run_id+0045_custom_property_definition_link_display_typediff --git a/products/customer_analytics/backend/models/custom_property_definition.py b/products/customer_analytics/backend/models/custom_property_definition.pyindex b5b8dd50fa6d..51285349c4da 100644--- a/products/customer_analytics/backend/models/custom_property_definition.py+++ b/products/customer_analytics/backend/models/custom_property_definition.py@@ -8,6 +8,7 @@ from posthog.models.utils import CreatedMetaFields, UpdatedMetaFields, UUIDModelclass DisplayType(StrEnum):TEXT = "text"+ LINK = "link"NUMBER = "number"CURRENCY = "currency"PERCENT = "percent"@@ -32,6 +33,7 @@ class DataType(StrEnum):DATA_TYPE_BY_DISPLAY_TYPE: dict[DisplayType, DataType] = {DisplayType.TEXT: DataType.STRING,+ DisplayType.LINK: DataType.STRING,DisplayType.NUMBER: DataType.NUMERIC,DisplayType.CURRENCY: DataType.NUMERIC,DisplayType.PERCENT: DataType.NUMERIC,diff --git a/products/customer_analytics/backend/presentation/views/serializers.py b/products/customer_analytics/backend/presentation/views/serializers.pyindex 5cc0bfe2e86d..a705886db43a 100644--- a/products/customer_analytics/backend/presentation/views/serializers.py+++ b/products/customer_analytics/backend/presentation/views/serializers.py@@ -1773,8 +1773,8 @@ class CustomPropertyDefinitionSerializer(DataclassSerializer):display_type = serializers.ChoiceField(choices=CUSTOM_PROPERTY_DISPLAY_TYPE_CHOICES,help_text=(- "How the property is interpreted and rendered: 'text', 'number', 'currency', "- "'percent', 'date', 'datetime', 'boolean', or 'select'."+ "How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', "+ "'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL."),)target_type = serializers.ChoiceField(@@ -1906,7 +1906,8 @@ class CustomPropertyValueWriteSerializer(serializers.Serializer):value = CustomPropertyValueField(help_text=("Value to store, matching the definition's type: a number for number/currency/percent, a "- "boolean for boolean, an ISO-8601 string for date/datetime, or text for text properties."+ "boolean for boolean, an ISO-8601 string for date/datetime, an HTTP or HTTPS URL for link properties, "+ "or text for text properties."))diff --git a/products/customer_analytics/backend/test/test_custom_property_values.py b/products/customer_analytics/backend/test/test_custom_property_values.pyindex 04bf6bb089d9..8ff7c925f62e 100644--- a/products/customer_analytics/backend/test/test_custom_property_values.py+++ b/products/customer_analytics/backend/test/test_custom_property_values.py@@ -71,6 +71,7 @@ class TestSetCustomPropertyValue(BaseTest):@parameterized.expand([("text", DisplayType.TEXT, "enterprise", "value_str", "enterprise"),+ ("link", DisplayType.LINK, "https://example.com/customer", "value_str", "https://example.com/customer"),("number_int", DisplayType.NUMBER, 12, "value_num", 12.0),("number_decimal", DisplayType.NUMBER, 9.99, "value_num", 9.99),("number_string", DisplayType.NUMBER, "42", "value_num", 42.0),@@ -123,6 +124,8 @@ class TestSetCustomPropertyValue(BaseTest):("datetime_from_unparseable", DisplayType.DATETIME, "not a date"),("datetime_from_number", DisplayType.DATETIME, 123),("text_from_list", DisplayType.TEXT, ["nope"]),+ ("link_with_unsafe_scheme", DisplayType.LINK, "javascript:alert(1)"),+ ("link_without_url", DisplayType.LINK, "example.com"),])def test_rejects_values_that_do_not_match_the_type(self, _name, display_type, value):diff --git a/products/customer_analytics/backend/test/test_views.py b/products/customer_analytics/backend/test/test_views.pyindex 4b12409fe60a..30e71926a7bb 100644--- a/products/customer_analytics/backend/test/test_views.py+++ b/products/customer_analytics/backend/test/test_views.py@@ -1652,6 +1652,7 @@ class TestCustomPropertyDefinitionViewSet(APIBaseTest):@parameterized.expand([("text", "text", status.HTTP_201_CREATED),+ ("link", "link", status.HTTP_201_CREATED),("number", "number", status.HTTP_201_CREATED),("currency", "currency", status.HTTP_201_CREATED),("percent", "percent", status.HTTP_201_CREATED),diff --git a/products/customer_analytics/frontend/components/Accounts/AGENTS.md b/products/customer_analytics/frontend/components/Accounts/AGENTS.mdindex c757a1634496..8707fcafaf7f 100644--- a/products/customer_analytics/frontend/components/Accounts/AGENTS.md+++ b/products/customer_analytics/frontend/components/Accounts/AGENTS.md@@ -88,7 +88,7 @@ The `tag_names` cell is editable in place: `TagsCell` renders the editable `ObjeDefault columns: `name`, `tag_names`, `notebook_count`, plus one relationship column per team definition. `ACCOUNTS_DEFAULT_COLUMNS` is the stored-state seed name, but execution is fully typed. Once `loadRelationshipDefinitionsSuccess` fires, still-default columns upgrade to `defaultSelectColumns`. The name column is force-kept because removing it breaks identity, scroll, and role edits. `buildAccountColumnGroups` only offers typed account fields, tags, notes, relationships, and custom properties. Warehouse-backed columns, arbitrary lazy joins, and SQL expressions are unsupported. Older saved expressions are omitted from the query plan.-**Custom property columns** surface the team's `CustomPropertyDefinition`s (loaded in `accountsColumnConfigLogic` via the generated `customPropertyDefinitionsList`) as a "Custom properties" picker group. Each is selected as ``accounts.custom_properties.values.`<definition-id>` AS cp_<id>`` — a JSON dot-access through the `custom_properties` lazy join on `system.accounts` (backed by the `customer_analytics_custompropertyvalue` EAV table; one JOIN regardless of column count). Because the alias is an opaque `cp_<id>`, every label-bearing surface must resolve it back via the `aliasToDefinition` selector: the table header (`useContextColumns` in `AccountsTable`) and the configurator's "Visible columns" list (`SelectedAccountColumn`). Cells render by display type (`CustomPropertyCell`: date→`TZLabel`, boolean→icon, select→`LemonColorGlyph` + label, numeric→`formatCustomPropertyValue`). Server-side sorting uses the typed custom property reference, and the backend chooses the value column from the definition's display type. The stored sort state (URL hash, saved views) keeps the clean column name. Numeric custom properties are also selectable in the **overview tiles** sum/avg/min/max/median/threshold pickers — `numericColumnOptions` recognizes the display type and wraps the value in `toFloatOrNull(...)` the same way so aggregation is numeric.+**Custom property columns** surface the team's `CustomPropertyDefinition`s (loaded in `accountsColumnConfigLogic` via the generated `customPropertyDefinitionsList`) as a "Custom properties" picker group. Each is selected as ``accounts.custom_properties.values.`<definition-id>` AS cp_<id>`` — a JSON dot-access through the `custom_properties` lazy join on `system.accounts` (backed by the `customer_analytics_custompropertyvalue` EAV table; one JOIN regardless of column count). Because the alias is an opaque `cp_<id>`, every label-bearing surface must resolve it back via the `aliasToDefinition` selector: the table header (`useContextColumns` in `AccountsTable`) and the configurator's "Visible columns" list (`SelectedAccountColumn`). Cells render by display type (`CustomPropertyCell`: date→`TZLabel`, boolean→icon, link→new-tab URL, select→`LemonColorGlyph` + label, numeric→`formatCustomPropertyValue`). Server-side sorting uses the typed custom property reference, and the backend chooses the value column from the definition's display type. The stored sort state (URL hash, saved views) keeps the clean column name. Numeric custom properties are also selectable in the **overview tiles** sum/avg/min/max/median/threshold pickers — `numericColumnOptions` recognizes the display type and wraps the value in `toFloatOrNull(...)` the same way so aggregation is numeric.**Custom property display modes (sparkline/trend)** let numeric custom property columns render their value history instead of the current value.The per-view config lives in `accountsColumnConfigLogic.columnDisplay` (`Record<definitionId, { mode: 'sparkline' | 'trend', window_days }>`), edited from the Configure Columns modal's edit section (the pencil on a custom-property row swaps the modal's bottom half from "Available columns" to the display editor).diff --git a/products/customer_analytics/frontend/components/Accounts/AccountsTable.tsx b/products/customer_analytics/frontend/components/Accounts/AccountsTable.tsxindex 224a365dc1fe..cae361a9c232 100644--- a/products/customer_analytics/frontend/components/Accounts/AccountsTable.tsx+++ b/products/customer_analytics/frontend/components/Accounts/AccountsTable.tsx@@ -382,6 +382,13 @@ function CustomPropertyCell({if (definition.display_type === 'boolean') {return value === 'true' || value === '1' ? <IconCheck /> : <IconX className="text-muted" />}+ if (definition.display_type === 'link') {+ return (+ <Link to={value} target="_blank" targetBlankIcon={false}>+ {value}+ </Link>+ )+ }if (definition.display_type === 'select') {const option = definition.options?.find((candidate) => candidate.label === value)return (diff --git a/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.test.ts b/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.test.tsindex a77b3d577c55..8c99ea0ff461 100644--- a/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.test.ts+++ b/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.test.ts@@ -280,6 +280,25 @@ describe('accountsTableQuery', () => {expect(plan.query.filters).toEqual([])})+ it('keeps contains filters for link properties', () => {+ const linkDefinition = { ...definition, display_type: 'link' } as CustomPropertyDefinitionApi+ const plan = buildAccountsTableQueryPlan(+ queryInput({+ customPropertyDefinitionsById: { [CUSTOM_PROPERTY_ID]: linkDefinition },+ accountFilters: [customFilter({ operator: PropertyOperator.IContains, value: 'example.com' })],+ })+ )++ expect(plan.query.filters).toEqual([+ {+ kind: 'custom_property',+ definitionId: CUSTOM_PROPERTY_ID,+ operator: AccountsTableCustomPropertyOperator.Contains,+ values: ['example.com'],+ },+ ])+ })+it('reads cells directly from keyed rows', () => {const plan = buildAccountsTableQueryPlan(queryInput()) as AccountsTableQueryPlanconst row = {diff --git a/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.ts b/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.tsindex 5c2e9b8f3cff..44af1e227981 100644--- a/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.ts+++ b/products/customer_analytics/frontend/components/Accounts/accountsTableQuery.ts@@ -194,6 +194,7 @@ function customPropertyFilter((operator === AccountsTableCustomPropertyOperator.Contains ||operator === AccountsTableCustomPropertyOperator.DoesNotContain) &&definition.display_type !== 'text' &&+ definition.display_type !== 'link' &&definition.display_type !== 'select') {return nulldiff --git a/products/customer_analytics/frontend/generated/api.schemas.ts b/products/customer_analytics/frontend/generated/api.schemas.tsindex 9214f977197a..959b5816b371 100644--- a/products/customer_analytics/frontend/generated/api.schemas.ts+++ b/products/customer_analytics/frontend/generated/api.schemas.ts@@ -465,7 +465,7 @@ export interface CustomPropertyValueApi {export interface CustomPropertyValueWriteApi {/** UUID of the custom property definition whose value to set for this account. */definition: string- /** Value to store, matching the definition's type: a number for number/currency/percent, a boolean for boolean, an ISO-8601 string for date/datetime, or text for text properties. */+ /** Value to store, matching the definition's type: a number for number/currency/percent, a boolean for boolean, an ISO-8601 string for date/datetime, an HTTP or HTTPS URL for link properties, or text for text properties. */value: string | number | boolean}@@ -1089,6 +1089,7 @@ export interface CalendarSyncTriggerResponseApi {/*** * `text` - text+ * * `link` - link* * `number` - number* * `currency` - currency* * `percent` - percent@@ -1102,6 +1103,7 @@ export type CustomPropertyDisplayTypeEnumApi =export const CustomPropertyDisplayTypeEnumApi = {Text: 'text',+ Link: 'link',Number: 'number',Currency: 'currency',Percent: 'percent',@@ -1398,9 +1400,10 @@ export interface CustomPropertyDefinitionApi {* @nullable*/description?: string | null- /** How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.+ /** How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.** * `text` - text+ * * `link` - link* * `number` - number* * `currency` - currency* * `percent` - percent@@ -1469,9 +1472,10 @@ export interface PatchedCustomPropertyDefinitionApi {* @nullable*/description?: string | null- /** How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.+ /** How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.** * `text` - text+ * * `link` - link* * `number` - number* * `currency` - currency* * `percent` - percentdiff --git a/products/customer_analytics/frontend/generated/api.zod.ts b/products/customer_analytics/frontend/generated/api.zod.tsindex 2016a6fecf98..19c82368053c 100644--- a/products/customer_analytics/frontend/generated/api.zod.ts+++ b/products/customer_analytics/frontend/generated/api.zod.ts@@ -252,7 +252,7 @@ export const AccountsCustomPropertyValuesCreateBody = /* @__PURE__ */ zod.objectvalue: zod.union([zod.string(), zod.number(), zod.boolean()]).describe(- "Value to store, matching the definition's type: a number for number\/currency\/percent, a boolean for boolean, an ISO-8601 string for date\/datetime, or text for text properties."+ "Value to store, matching the definition's type: a number for number\/currency\/percent, a boolean for boolean, an ISO-8601 string for date\/datetime, an HTTP or HTTPS URL for link properties, or text for text properties."),})@@ -445,12 +445,12 @@ export const CustomPropertyDefinitionsCreateBody = /* @__PURE__ */ zod.describe('Human-readable name of the custom property. Unique within the team.'),description: zod.string().nullish().describe('Optional description of what the property represents.'),display_type: zod- .enum(['text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select'])+ .enum(['text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select']).describe(- '\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select'+ '\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select').describe(- "How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.\n\n\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"+ "How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.\n\n\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"),target_type: zod.enum(['account', 'person', 'group'])@@ -533,12 +533,12 @@ export const CustomPropertyDefinitionsUpdateBody = /* @__PURE__ */ zod.describe('Human-readable name of the custom property. Unique within the team.'),description: zod.string().nullish().describe('Optional description of what the property represents.'),display_type: zod- .enum(['text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select'])+ .enum(['text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select']).describe(- '\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select'+ '\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select').describe(- "How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.\n\n\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"+ "How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.\n\n\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"),target_type: zod.enum(['account', 'person', 'group'])@@ -622,13 +622,13 @@ export const CustomPropertyDefinitionsPartialUpdateBody = /* @__PURE__ */ zod.describe('Human-readable name of the custom property. Unique within the team.'),description: zod.string().nullish().describe('Optional description of what the property represents.'),display_type: zod- .enum(['text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select'])+ .enum(['text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select']).describe(- '\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select'+ '\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select').optional().describe(- "How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.\n\n\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"+ "How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.\n\n\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"),target_type: zod.enum(['account', 'person', 'group'])diff --git a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/AccountTrackRules.tsx b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/AccountTrackRules.tsxindex 7f92ce09fae7..5ab34e28d769 100644--- a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/AccountTrackRules.tsx+++ b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/AccountTrackRules.tsx@@ -8,6 +8,7 @@ import {LemonColorGlyph,LemonDivider,LemonSegmentedButton,+ Link,LemonSwitch,LemonTable,LemonTableColumns,@@ -403,6 +404,13 @@ function PreviewRuleValue({if (definition?.display_type === 'boolean') {return stringValue === 'true' || stringValue === '1' ? <IconCheck /> : <IconX className="text-muted" />}+ if (definition?.display_type === 'link') {+ return (+ <Link to={stringValue} target="_blank" targetBlankIcon={false}>+ {stringValue}+ </Link>+ )+ }if (definition?.display_type === 'select') {const option = definition.options?.find((candidate) => candidate.label === stringValue)return (diff --git a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.test.ts b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.test.tsindex 3de242515b21..6bcc52ff9059 100644--- a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.test.ts+++ b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.test.ts@@ -35,6 +35,7 @@ describe('customPropertyTypes', () => {expect(labelForDisplayType('currency')).toBe('Currency')expect(labelForDisplayType('datetime')).toBe('Date & time')expect(labelForDisplayType('text')).toBe('Text')+ expect(labelForDisplayType('link')).toBe('Link')expect(labelForDisplayType('boolean')).toBe('True / false')})diff --git a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.ts b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.tsindex 4b616eb790d1..6846a9c9daec 100644--- a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.ts+++ b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/customPropertyTypes.ts@@ -19,6 +19,7 @@ export interface DisplayTypeOption {export const DISPLAY_TYPE_OPTIONS: DisplayTypeOption[] = [{ value: 'text', label: 'Text', isNumeric: false },+ { value: 'link', label: 'Link', isNumeric: false },{ value: 'number', label: 'Number', isNumeric: true },{ value: 'currency', label: 'Currency', isNumeric: true },{ value: 'percent', label: 'Percent', isNumeric: true },diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex d72f43737afa..b7d5da753e2d 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -19982,6 +19982,7 @@ export namespace Schemas {/*** * `text` - text+ * * `link` - link* * `number` - number* * `currency` - currency* * `percent` - percent@@ -19995,6 +19996,7 @@ export namespace Schemas {export const CustomPropertyDisplayTypeEnum = {Text: 'text',+ Link: 'link',Number: 'number',Currency: 'currency',Percent: 'percent',@@ -20281,9 +20283,10 @@ export namespace Schemas {* @nullable*/description?: string | null;- /** How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.+ /** How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.** * `text` - text+ * * `link` - link* * `number` - number* * `currency` - currency* * `percent` - percent@@ -20417,7 +20420,7 @@ export namespace Schemas {export interface CustomPropertyValueWrite {/** UUID of the custom property definition whose value to set for this account. */definition: string;- /** Value to store, matching the definition's type: a number for number/currency/percent, a boolean for boolean, an ISO-8601 string for date/datetime, or text for text properties. */+ /** Value to store, matching the definition's type: a number for number/currency/percent, a boolean for boolean, an ISO-8601 string for date/datetime, an HTTP or HTTPS URL for link properties, or text for text properties. */value: string | number | boolean;}@@ -59748,9 +59751,10 @@ export namespace Schemas {* @nullable*/description?: string | null;- /** How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.+ /** How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.** * `text` - text+ * * `link` - link* * `number` - number* * `currency` - currency* * `percent` - percentdiff --git a/services/mcp/src/generated/customer_analytics/api.ts b/services/mcp/src/generated/customer_analytics/api.tsindex 074566ad740a..990cb4562fae 100644--- a/services/mcp/src/generated/customer_analytics/api.ts+++ b/services/mcp/src/generated/customer_analytics/api.ts@@ -237,7 +237,7 @@ export const AccountsCustomPropertyValuesCreateBody = /* @__PURE__ */ zod.objectvalue: zod.union([zod.string(), zod.number(), zod.boolean()]).describe(- "Value to store, matching the definition's type: a number for number\/currency\/percent, a boolean for boolean, an ISO-8601 string for date\/datetime, or text for text properties."+ "Value to store, matching the definition's type: a number for number\/currency\/percent, a boolean for boolean, an ISO-8601 string for date\/datetime, an HTTP or HTTPS URL for link properties, or text for text properties."),})@@ -553,12 +553,12 @@ export const CustomPropertyDefinitionsCreateBody = /* @__PURE__ */ zod.describe('Human-readable name of the custom property. Unique within the team.'),description: zod.string().nullish().describe('Optional description of what the property represents.'),display_type: zod- .enum(['text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select'])+ .enum(['text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select']).describe(- '\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select'+ '\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select').describe(- "How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.\n\n\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"+ "How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.\n\n\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"),target_type: zod.enum(['account', 'person', 'group'])@@ -658,13 +658,13 @@ export const CustomPropertyDefinitionsPartialUpdateBody = /* @__PURE__ */ zod.describe('Human-readable name of the custom property. Unique within the team.'),description: zod.string().nullish().describe('Optional description of what the property represents.'),display_type: zod- .enum(['text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select'])+ .enum(['text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', 'select']).describe(- '\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select'+ '\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select').optional().describe(- "How the property is interpreted and rendered: 'text', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'.\n\n\* `text` - text\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"+ "How the property is interpreted and rendered: 'text', 'link', 'number', 'currency', 'percent', 'date', 'datetime', 'boolean', or 'select'. Links require an HTTP or HTTPS URL.\n\n\* `text` - text\n\* `link` - link\n\* `number` - number\n\* `currency` - currency\n\* `percent` - percent\n\* `date` - date\n\* `datetime` - datetime\n\* `boolean` - boolean\n\* `select` - select"),target_type: zod.enum(['account', 'person', 'group'])