You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6982671
Browse filesBrowse the repository at this point in the historyBrowse files
fix: treat a per-call disable_geoip as a value of the event
A disable_geoip argument now fills $geoip_disable as the event's own
value: above context tags, super_properties and the client setting, and
below a $geoip_disable in the call's properties. disable_geoip=False now
sends $geoip_disable: false. Client and AsyncClient share the layer in
_build_event_defaults.
A `disable_geoip` argument to a call now counts as a value of that event. It wins over a `$geoip_disable` in context tags or `super_properties`, and a `$geoip_disable` in the call's own `properties` still wins over it. `disable_geoip=False` now sends `$geoip_disable: false`, so it turns GeoIP lookup on for that event even when a context tag or `super_properties` turns it off. The client's `disable_geoip` setting keeps its place below every caller value. `AsyncPosthog` follows the same rules.
Copy file name to clipboardExpand all lines: docs/migration-7.x-to-8.0.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,10 +149,10 @@ Capture v1 sends processing options in an `options` object, next to `properties`
149
149
150
150
Values apply in this order. Steps 2 to 4 fill only the options and properties that the steps before them left unset:
151
151
152
-
1. the `options` and `properties` of the call
152
+
1. the `options` and `properties` of the call, then the call's `disable_geoip` argument, which fills `$geoip_disable`
153
153
2. context options and tags
154
154
3.`super_options` and `super_properties`
155
-
4. values the SDK sets: `$is_server` from `is_server`, `$geoip_disable` from `disable_geoip`, system properties such as `$os` and `$python_version`, `options.process_person_profile = false` for events without a distinct ID, and `$release_id` from `POSTHOG_RELEASE_ID`
155
+
4. values the SDK sets: `$is_server` from `is_server`, `$geoip_disable` from the client's `disable_geoip` setting, system properties such as `$os` and `$python_version`, `options.process_person_profile = false` for events without a distinct ID, and `$release_id` from `POSTHOG_RELEASE_ID`
156
156
5.`before_send`, which sees the result of steps 1 to 4 and can change or remove any of it
157
157
6. legacy properties, which fill unset options and are then removed
158
158
@@ -165,6 +165,7 @@ These changes follow from this order:
165
165
166
166
- Properties passed to a call now override `super_properties`. `super_properties` can no longer change `$lib` or `$lib_version`.
167
167
- A `$is_server`, `$geoip_disable` or system property such as `$os` that you set in a call or a context tag now wins over the SDK's value. In 7.x the SDK overwrote it. `super_properties` win over the SDK's value too, so `super_properties={"$geoip_disable": False}` turns GeoIP lookup on for events, even with `disable_geoip=True`.
168
+
- A `disable_geoip` argument to a call belongs to that event, so it wins over context tags and `super_properties`. A `$geoip_disable` in the call's own `properties` still wins over it. `disable_geoip=False` now sends `$geoip_disable: false`. In 7.x it sent no `$geoip_disable` property.
168
169
- The `groups` argument merges into a `$groups` property of the call, and wins key by key. In 7.x it replaced the property. MCP events merge their identity's groups into a custom `$groups` property the same way.
169
170
- A `$set`, `$set_once`, `$groups` or `$group_set` in `super_properties` no longer replaces the whole value of the call. The two merge, and the call wins key by key.
170
171
- An event without a distinct ID gets `options.process_person_profile = false`. A `$process_person_profile: true` property no longer turns person processing back on. Set the option instead.
0 commit comments