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
userIdUnique 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

userIdgenderbirthYearcityzip
1female1980Budapest1123
2male1981LondonSE1 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: