File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -199,8 +199,8 @@ def group_identify(
199
199
200
200
201
201
def alias (
202
- previous_id , # type: str,
203
202
distinct_id , # type: str,
203
+ alias_id , # type: str,
204
204
context = None , # type: Optional[Dict]
205
205
timestamp = None , # type: Optional[datetime.datetime]
206
206
uuid = None , # type: Optional[str]
@@ -214,18 +214,25 @@ def alias(
214
214
The same concept applies for when a user logs in.
215
215
216
216
An `alias` call requires
217
- - `previous distinct id` the unique ID of the user before
218
- - `distinct id` the current unique id
217
+ - `distinct id` the current unique id of the user (normally the id in your database)
218
+ - `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
219
+
219
220
220
221
For example:
221
222
```python
222
- posthog.alias('anonymous session id', 'distinct id')
223
+ posthog.alias('distinct id', 'anonymous session id')
224
+ ```
225
+
226
+ or
227
+
228
+ ```python
229
+ posthog.alias('distinct id', '[email protected] ')
223
230
```
224
231
"""
225
232
_proxy (
226
233
"alias" ,
227
- previous_id = previous_id ,
228
234
distinct_id = distinct_id ,
235
+ previous_id = previous_id ,
229
236
context = context ,
230
237
timestamp = timestamp ,
231
238
uuid = uuid ,
You can’t perform that action at this time.
0 commit comments