...
FIELD | REQUIRED? | TYPE | DESCRIPTION |
| optional | Object | Free-form dictionary of traits of the user, like |
| required; optional if | String | Unique identifier for the user in your database. A |
Example
Here’s a complete example of an identify
call:
...
The Anonymous ID can take the form of any pseudo-unique identifier. For instance, on your servers, you can employ a session ID. Alternatively, in cases where you lack an readily available identifier, you can generate a new random one, and we recommend using UUIDs for this purpose.
Please note that http:// journy.io 's browser libraries automatically utilize Anonymous IDs to trace users as they navigate your website or app. Hence, when using these libraries, you need not concern yourself with managing them separately.
...
A User ID is usually the unique identifier that you recognize a user by in your own database.
http://journy.io suggests employing database IDs over mere email addresses or usernames due to the inherent stability of database IDs. Database IDs remain constant, ensuring that even if a user modifies their email address, you can consistently identify them across all your analytics tools. Moreover, this approach facilitates the correlation of analytics data with your internal database seamlessly.
...
Traits are pieces of information you know about a user that are included in an identify
call. These could be demographics like age
or gender
, account-specific like plan
, or even things like whether a user has seen a particular A/B test variation. Up to you!
http://journy.io has reserved some traits that have semantic meanings for users, and we handle them in special ways. For example, http:// journy.io always expects email
to be a string of the user’s email address. We’ll send this on to destinations like Mailchimp that require an email address for their tracking.
You should only use reserved traits for their intended meaning.
Reserved traits http:// journy.io has standardized:
TRAIT | TYPE | DESCRIPTION |
| Object | Street address of a user optionally containing: |
| Number | Age of a user |
| String | URL to an avatar image for the user |
| Date | User’s birthday |
| Object | Company the user represents, optionally containing: |
| Date | Date the user’s account was first created. http:// journy.io recommends using ISO-8601 date strings. |
| String | Description of the user |
| String | Email address of a user |
| String | First name of a user |
| String | Gender of a user |
| String | Unique ID in your database for a user |
| String | Last name of a user |
| String | Full name of a user. If you only pass a first and last name http:// journy.io automatically fills in the full name for you. |
| String | Phone number of a user |
| String | Title of a user, usually related to their position at a specific company. Example: “VP of Engineering” |
| String | User’s username. This should be unique to each user, like the usernames of Twitter or GitHub. |
| String | Website of a user |
Note: You might be used to some destinations recognizing special traits by slightly different names. For example, Mixpanel recognizes a $created
trait when the user’s account was first created, while Intercom recognizes the same trait as created_at
instead. http:// journy.io attempts to handle all the destination-specific conversions for you automatically.
You can pass these reserved traits using camelCase or snake_case, so in JavaScript you can match the rest of your camel-case code by sending firstName
, while in Ruby you can match your snake-case code by sending first_name
. That way the API never seems alien to your code base. Keep in mind that not all destinations support these reserved traits, so sending these traits in camelCase and snake_case can result in two sets of traits in other destinations.