-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from interakt/develop
Develop
- Loading branch information
Showing
6 changed files
with
19 additions
and
16 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
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 |
---|---|---|
|
@@ -42,12 +42,12 @@ track.on_error = on_error | |
|
||
# APIs | ||
## User | ||
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. | ||
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. | ||
|
||
Example `user` call: | ||
``` | ||
track.user( | ||
userId="<user_id in your db>", | ||
user_id="<user_id in your db>", | ||
traits={ | ||
"name": "John Doe", | ||
"email": "[email protected]", | ||
|
@@ -58,15 +58,15 @@ track.user( | |
#### The `user` call has the following fields: | ||
|Field|Data type|Description| | ||
|--|--|--| | ||
|userId|str or int|The ID for the user in your database.| | ||
|countryCode|str|country code for the phone_number (default value is "+91")| | ||
|phoneNumber|str|phone_number without country_code (eg: "9876598765")| | ||
|user_id|str or int|The ID for the user in your database.| | ||
|country_code|str|country code for the phone_number (default value is "+91")| | ||
|phone_number|str|phone_number without country_code (eg: "9876598765")| | ||
|traits|dict|A dict of traits you know about the user. Things like: `email`, `name` or `age`| | ||
|
||
**NOTE:** Atleast one of these two is required for user identification : | ||
|
||
- **userId**, OR | ||
- **phoneNumber** with **countryCode** | ||
- **user_id**, OR | ||
- **phone_number** with **country_code** | ||
|
||
|
||
|
||
|
@@ -76,7 +76,7 @@ track.user( | |
Example `event` call: | ||
``` | ||
track.event( | ||
userId="<user id in your db>", | ||
user_id="<user id in your db>", | ||
event="Product Added", | ||
traits={"price": 200} | ||
) | ||
|
@@ -85,6 +85,6 @@ track.event( | |
|
||
|Field|Data type|Description| | ||
|--|--|--| | ||
|userId|str or int|The ID for the user in your database.| | ||
|user_id|str or int|The ID for the user in your database.| | ||
|event|str|Name of the event you want to track, For eg: "Product Added".| | ||
|traits|dict|dictionary of properties for the event. If the event was **Product Added**, it might have properties like `price` or `product_name`.| |
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
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
VERSION = '1.0.2' | ||
VERSION = '1.0.3' |