We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
set
1 parent 6e00d57 commit c9ccc66Copy full SHA for c9ccc66
1 file changed
posthog/client.py
@@ -671,21 +671,7 @@ def set(self, **kwargs: Unpack[OptionalSetArgs]) -> Optional[str]:
671
Examples:
672
```python
673
# Set with distinct id
674
- posthog.capture(
675
- 'event_name',
676
- distinct_id='user-distinct-id',
677
- properties={
678
- '$set': {'name': 'Max Hedgehog'},
679
- '$set_once': {'initial_url': '/blog'}
680
- }
681
- )
682
- ```
683
- ```python
684
- # Set using context
685
- from posthog import new_context, identify_context
686
- with new_context():
687
- identify_context('user-distinct-id')
688
- posthog.capture('event_name')
+ posthog.set(distinct_id='user123', properties={'name': 'Max Hedgehog'})
689
```
690
691
Category:
0 commit comments