We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
set
1 parent f648a5d commit a155e1dCopy full SHA for a155e1d
posthog/client.py
@@ -725,21 +725,7 @@ def set(self, **kwargs: Unpack[OptionalSetArgs]) -> Optional[str]:
725
Examples:
726
```python
727
# Set with distinct id
728
- posthog.capture(
729
- 'event_name',
730
- distinct_id='user-distinct-id',
731
- properties={
732
- '$set': {'name': 'Max Hedgehog'},
733
- '$set_once': {'initial_url': '/blog'}
734
- }
735
- )
736
- ```
737
- ```python
738
- # Set using context
739
- from posthog import new_context, identify_context
740
- with new_context():
741
- identify_context('user-distinct-id')
742
- posthog.capture('event_name')
+ posthog.set(distinct_id='user123', properties={'name': 'Max Hedgehog'})
743
```
744
745
Category:
0 commit comments