-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
@@ -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, | ||
|