You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,12 +42,12 @@ track.on_error = on_error
42
42
43
43
# APIs
44
44
## User
45
-
The `identify` lets you tie a user to their actions and record traits about them. It includes a unique **User ID** or **Phone Number and Country Code** any optional traits you know about them.
45
+
The track `user` call lets you tie a user to their actions and record traits about them. It includes a unique **User ID** or **Phone Number and Country Code** any optional traits you know about them.
46
46
47
47
Example `user` call:
48
48
```
49
49
track.user(
50
-
userId="<user_id in your db>",
50
+
user_id="<user_id in your db>",
51
51
traits={
52
52
"name": "John Doe",
53
53
"email": "john@email.com",
@@ -58,15 +58,15 @@ track.user(
58
58
#### The `user` call has the following fields:
59
59
|Field|Data type|Description|
60
60
|--|--|--|
61
-
|userId|str or int|The ID for the user in your database.|
62
-
|countryCode|str|country code for the phone_number (default value is "+91")|
63
-
|phoneNumber|str|phone_number without country_code (eg: "9876598765")|
61
+
|user_id|str or int|The ID for the user in your database.|
62
+
|country_code|str|country code for the phone_number (default value is "+91")|
63
+
|phone_number|str|phone_number without country_code (eg: "9876598765")|
64
64
|traits|dict|A dict of traits you know about the user. Things like: `email`, `name` or `age`|
65
65
66
66
**NOTE:** Atleast one of these two is required for user identification :
67
67
68
-
-**userId**, OR
69
-
-**phoneNumber** with **countryCode**
68
+
-**user_id**, OR
69
+
-**phone_number** with **country_code**
70
70
71
71
72
72
@@ -76,7 +76,7 @@ track.user(
76
76
Example `event` call:
77
77
```
78
78
track.event(
79
-
userId="<user id in your db>",
79
+
user_id="<user id in your db>",
80
80
event="Product Added",
81
81
traits={"price": 200}
82
82
)
@@ -85,6 +85,6 @@ track.event(
85
85
86
86
|Field|Data type|Description|
87
87
|--|--|--|
88
-
|userId|str or int|The ID for the user in your database.|
88
+
|user_id|str or int|The ID for the user in your database.|
89
89
|event|str|Name of the event you want to track, For eg: "Product Added".|
90
90
|traits|dict|dictionary of properties for the event. If the event was **Product Added**, it might have properties like `price` or `product_name`.|
0 commit comments