: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(ingestion): preserve browser-captured Meta click timestamps (#92150)
Harley Alexander1145ca1d928b
diff --git a/frontend/src/taxonomy/core-filter-definitions-by-group.json b/frontend/src/taxonomy/core-filter-definitions-by-group.jsonindex da387568d775..9fcc0920e95a 100644--- a/frontend/src/taxonomy/core-filter-definitions-by-group.json+++ b/frontend/src/taxonomy/core-filter-definitions-by-group.json@@ -6247,6 +6247,14 @@],"label": "External click URL"},+ "$fbc": {+ "description": "The Facebook click ID in the format Meta's Conversions API expects, built when PostHog saw the fbclid so it carries the time of the ad click. Equivalent to the `_fbc` cookie the Meta pixel sets.",+ "examples": [+ "fb.1.1735689600000.IwAR2xY9zAbCdEf"+ ],+ "label": "Facebook click ID (fbc)",+ "type": "String"+ },"$feature_flag": {"description": "The feature flag that was called.\n\nWarning! This only works in combination with the $feature_flag_called event. If you want to filter other events, try \"Active feature flags\".","examples": [diff --git a/nodejs/src/common/persons/person-property-utils.test.ts b/nodejs/src/common/persons/person-property-utils.test.tsnew file mode 100644index 000000000000..102afd9fc3a7--- /dev/null+++ b/nodejs/src/common/persons/person-property-utils.test.ts@@ -0,0 +1,8 @@+import { canTrimProperty } from './person-property-utils'++describe('canTrimProperty', () => {+ it('protects SDK-derived campaign person properties', () => {+ expect(canTrimProperty('$fbc')).toBe(false)+ expect(canTrimProperty('custom_property')).toBe(true)+ })+})diff --git a/nodejs/src/common/persons/person-property-utils.ts b/nodejs/src/common/persons/person-property-utils.tsindex e01747ccb653..970488cb7822 100644--- a/nodejs/src/common/persons/person-property-utils.ts+++ b/nodejs/src/common/persons/person-property-utils.ts@@ -76,11 +76,14 @@ const INITIAL_PROPERTIES = new Set(['$initial_utm_term',])+const DERIVED_CAMPAIGN_PROPERTIES = new Set(['$fbc'])+// Combined set of all properties that should be protected from trimmingconst ALL_PROTECTED_PROPERTIES = new Set([...CORE_PERSON_PROPERTIES,...EVENT_TO_PERSON_PROPERTIES,...CAMPAIGN_PROPERTIES,+ ...DERIVED_CAMPAIGN_PROPERTIES,...SESSION_PROPERTIES,...IDENTITY_PROPERTIES,...INITIAL_PROPERTIES,diff --git a/posthog/taxonomy/taxonomy.py b/posthog/taxonomy/taxonomy.pyindex da7b8c3db30d..e16c9b109c9a 100644--- a/posthog/taxonomy/taxonomy.py+++ b/posthog/taxonomy/taxonomy.py@@ -3607,6 +3607,12 @@ CORE_FILTER_DEFINITIONS_BY_GROUP: dict[str, dict[str, CoreFilterDefinition]] = {"description": "The product tours that have been activated for this user.","type": "String",},+ "$fbc": {+ "label": "Facebook click ID (fbc)",+ "description": "The Facebook click ID in the format Meta's Conversions API expects, built when PostHog saw the fbclid so it carries the time of the ad click. Equivalent to the `_fbc` cookie the Meta pixel sets.",+ "examples": ["fb.1.1735689600000.IwAR2xY9zAbCdEf"],+ "type": "String",+ },},"session_properties": {"$session_duration": {diff --git a/rust/personhog-common/src/properties.rs b/rust/personhog-common/src/properties.rsindex b0dde2f6d72a..d8b22ecd69cb 100644--- a/rust/personhog-common/src/properties.rs+++ b/rust/personhog-common/src/properties.rs@@ -73,6 +73,7 @@ static PROTECTED_PROPERTIES: LazyLock<HashSet<&'static str>> = LazyLock::new(||"epik","qclid","sccid",+ "$fbc",// Session and page tracking"$session_id","$window_id",@@ -595,6 +596,7 @@ mod tests {assert!(!can_trim_property("email"));assert!(!can_trim_property("$browser"));assert!(!can_trim_property("utm_source"));+ assert!(!can_trim_property("$fbc"));assert!(!can_trim_property("$user_id"));assert!(!can_trim_property("$initial_referrer"));assert!(can_trim_property("custom_field"));