Skip to content

Commit

Permalink
Update alias docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lharries authored Jan 24, 2023
1 parent ae8817b commit c4a298b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions posthog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ def group_identify(


def alias(
previous_id, # type: str,
distinct_id, # type: str,
alias_id, # type: str,
context=None, # type: Optional[Dict]
timestamp=None, # type: Optional[datetime.datetime]
uuid=None, # type: Optional[str]
Expand All @@ -214,18 +214,25 @@ def alias(
The same concept applies for when a user logs in.
An `alias` call requires
- `previous distinct id` the unique ID of the user before
- `distinct id` the current unique id
- `distinct id` the current unique id of the user (normally the id in your database)
- `alias distinct id` the alias id you want to attach to the user, such as the anonymous session id or another ID like their email
For example:
```python
posthog.alias('anonymous session id', 'distinct id')
posthog.alias('distinct id', 'anonymous session id')
```
or
```python
posthog.alias('distinct id', '[email protected]')
```
"""
_proxy(
"alias",
previous_id=previous_id,
distinct_id=distinct_id,
previous_id=previous_id,
context=context,
timestamp=timestamp,
uuid=uuid,
Expand Down

0 comments on commit c4a298b

Please sign in to comment.