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(
199199
200200
201201def alias (
202- previous_id , # type: str,
203202 distinct_id , # type: str,
203+ alias_id , # type: str,
204204 context = None , # type: Optional[Dict]
205205 timestamp = None , # type: Optional[datetime.datetime]
206206 uuid = None , # type: Optional[str]
@@ -214,18 +214,25 @@ def alias(
214214 The same concept applies for when a user logs in.
215215
216216 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+
219220
220221 For example:
221222 ```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] ') 223230 ```
224231 """
225232 _proxy (
226233 "alias" ,
227- previous_id = previous_id ,
228234 distinct_id = distinct_id ,
235+ previous_id = previous_id ,
229236 context = context ,
230237 timestamp = timestamp ,
231238 uuid = uuid ,
You can’t perform that action at this time.
0 commit comments