Users
A user is defined as the end user of the website.
It is fully optional but advisable to provide a catalog of users.
Users are identified by a unique ID and they can have as many custom attributes as required.
Attributes are used for:
- metadata-based recommendations
- filtering using business rules
User Anatomy
User Property Name (Key) | Description |
---|---|
userId | Unique identifier for the user |
<custom_property> | Any additional information about the user, e.g. - gender - birthYear - city - zip |
Important! All User property names (keys) should not exceed 32 characters.
File-based user catalog update
You can provide user catalogs to Gravity using a TSV, CSV or XML file. The catalog file should be made available over HTTP/HTTPS/FTP and it will be periodically imported into our database.
sample user catalog
TSV or CSV
userId | gender | birthYear | city | zip |
---|---|---|---|---|
1 | female | 1980 | Budapest | 1123 |
2 | male | 1981 | London | SE1 7JY |
XML
<users>
<user>
<userId>1</userId>
<gender>femaler</gender>
<birthYear>1980</birthYear>
<city>Budapest</city>
<zip>1123</zip>
</user>
<user>
<userId>2</userId>
<gender>male</gender>
<birthYear>1981</birthYear>
<city>London</city>
<zip>SE1 7JY</zip>
</user>
</users>
Server-side API user catalog update
For special cases e.g. if every second counts and very frequent user updates are needed you can use direct server side API calls. We have ready-made client libraries for Java and PHP. For other programming languages REST API is available.
For more details please visit the following pages:
Updated over 5 years ago