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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,11 @@
1
+
# 6.0.0
2
+
3
+
This release contains a number of major breaking changes:
4
+
- feat: make distinct_id an optional parameter in posthog.capture and related functions
5
+
- feat: make capture and related functions return `Optional[str]`, which is the UUID of the sent event, if it was sent
6
+
- fix: remove `identify` (prefer `posthog.set()`), and `page` and `screen` (prefer `posthog.capture()`)
7
+
- fix: delete exception-capture specific integrations module. Prefer the general-purpose django middleware as a replacement for the django `Integration`.
Capture allows you to capture anything a user does within your system, which you can later use in PostHog to find patterns in usage, work out which features to improve or where people are giving up.
71
69
72
70
A `capture` call requires
73
-
- `distinct id` which uniquely identifies your user
74
71
- `event name` to specify the event
75
72
- We recommend using [verb] [noun], like `movie played` or `movie updated` to easily identify what your events mean later on.
76
73
77
74
Optionally you can submit
75
+
- `distinct id` which uniquely identifies your user. This overrides any context-level ID, if set
78
76
- `properties`, which can be a dict with any information you'd like to add
79
77
- `groups`, which is a dict of group type -> group key mappings
80
78
@@ -87,19 +85,11 @@ def capture(
87
85
```
88
86
"""
89
87
90
-
ifcontextisnotNone:
91
-
warnings.warn(
92
-
"The 'context' parameter is deprecated and will be removed in a future version.",
Identify lets you add metadata on your users so you can more easily identify who they are in PostHog, and even do things like segment users by these properties.
122
-
123
-
An `identify` call requires
124
-
- `distinct id` which uniquely identifies your user
125
-
- `properties` with a dict with any key: value pairs
Set properties on a user record, only if they do not yet exist.
208
142
This will not overwrite previous people property values, unlike `identify`.
@@ -218,19 +152,10 @@ def set_once(
218
152
})
219
153
```
220
154
"""
221
-
222
-
ifcontextisnotNone:
223
-
warnings.warn(
224
-
"The 'context' parameter is deprecated and will be removed in a future version.",
225
-
DeprecationWarning,
226
-
stacklevel=2,
227
-
)
228
-
229
155
return_proxy(
230
156
"set_once",
231
157
distinct_id=distinct_id,
232
158
properties=properties,
233
-
context=context,
234
159
timestamp=timestamp,
235
160
uuid=uuid,
236
161
disable_geoip=disable_geoip,
@@ -246,7 +171,7 @@ def group_identify(
246
171
uuid=None, # type: Optional[str]
247
172
disable_geoip=None, # type: Optional[bool]
248
173
):
249
-
# type: (...) -> Tuple[bool, dict]
174
+
# type: (...) -> Optional[str]
250
175
"""
251
176
Set properties on a group
252
177
@@ -290,7 +215,7 @@ def alias(
290
215
uuid=None, # type: Optional[str]
291
216
disable_geoip=None, # type: Optional[bool]
292
217
):
293
-
# type: (...) -> Tuple[bool, dict]
218
+
# type: (...) -> Optional[str]
294
219
"""
295
220
To marry up whatever a user does before they sign up or log in with what they do after you need to make an alias call. This will allow you to answer questions like "Which marketing channels leads to users churning after a month?" or "What do users do on our website before signing up?"
capture_exception allows you to capture exceptions that happen in your code. This is useful for debugging and understanding what errors your users are encountering.
342
266
This function never raises an exception, even if it fails to send the event.
@@ -361,19 +285,11 @@ def capture_exception(
361
285
```
362
286
"""
363
287
364
-
ifcontextisnotNone:
365
-
warnings.warn(
366
-
"The 'context' parameter is deprecated and will be removed in a future version.",
367
-
DeprecationWarning,
368
-
stacklevel=2,
369
-
)
370
-
371
288
return_proxy(
372
289
"capture_exception",
373
290
exception=exception,
374
291
distinct_id=distinct_id,
375
292
properties=properties,
376
-
context=context,
377
293
timestamp=timestamp,
378
294
uuid=uuid,
379
295
groups=groups,
@@ -565,16 +481,6 @@ def load_feature_flags():
565
481
return_proxy("load_feature_flags")
566
482
567
483
568
-
defpage(*args, **kwargs):
569
-
"""Send a page call."""
570
-
_proxy("page", *args, **kwargs)
571
-
572
-
573
-
defscreen(*args, **kwargs):
574
-
"""Send a screen call."""
575
-
_proxy("screen", *args, **kwargs)
576
-
577
-
578
484
defflush():
579
485
"""Tell the client to flush."""
580
486
_proxy("flush")
@@ -613,7 +519,6 @@ def setup():
613
519
# or deprecate this proxy option fully (it's already in the process of deprecation, no new clients should be using this method since like 5-6 months)
0 commit comments