Custom attributes

Pavior lets you attach useful information to each of your users and customers - we call these attributes. We automatically track some attributes out-of-the-box, and let you define your own custom attributes that are unique to your business.

You can use attributes in order to generate reports and to send messages or announcements to the specific users they are intended for.

Built-in attributes

The following attributes are automatically kept track of by Pavior:

Rendered name

API name

Description

Id

id

Your user's id. This can be set to the id that you use internally in your other systems, or it will be automatically set to the customer's email if an id is not provided.

Email

email

Your user's email.

Name

name

Your user's full name.

First name

firstName

Your user's first name.

Last name

lastName

Your user's last name.

Phone

phone

Your user's phone number.

City

city

The city from which your user most recently visited your website.

Country

country

The country from which your user most recently visited your website.

Total visits

totalVisits

The total number of times the user has visited your website. A visit or a session is defined as a chunk of activity on your website separated by at least 30 minutes from any other activity on your website.

Last seen

lastVisitedAt

The most recent time the user visited your website.

Last activity

lastActivityAt

The most recent time the user performed any activity in relation to your business. This includes visiting your website, but also other activity such as sending an email.

First known of

createdAt

The date when the user was first added to your database. This can be overridden if you are importing existing users from another system.

Signed up on

signedUpOn

The date when the user became a signup. This requires your website to securely let us know when a user logs in, using HMAC authentication.

Email subscription

emailSubscription

Whether the user is subscribed to receive emails from you. If this flag is set to false, then Pavior will not send any emails to this user. They will have to visit your website to view messages. They will also be able to resubscribe to emails from within the Pavior bubble on your site.

Total time spent

totalTimeSpent

This is the total time the user spent on your website.

Time on current page

timeOnCurrentPage

This is the amount of time the user has spent browsing the current webpage that they're on. This is a live attribute, it can only be used for targeting messages and events. You cannot get a list of users based on this attribute.

Current page URL

currentPageURL

This is the URL that the user is currently looking at. This is a live attribute, it can only be used for targeting messages and events. You cannot get a list of users based on this attribute.

Current session duration

currentSessionDuration

This is the amount of time the user has spent on your website since the start of their most recent visit. This is a live attribute, it can only be used for targeting messages and events. You cannot get a list of users based on this attribute.

Interacted in current session

interactedInCurrentSession

This is set to true if the user has interacted with your website in any way (mouse clicks or key presses) during the current session. Use this to avoid interrupting your user for certain events. This is a live attribute, it can only be used for targeting messages and events. You cannot get a list of users based on this attribute.

Custom attributes

Custom attributes are used to customize Pavior to exactly match the needs of your business. Each custom attribute must have a name. The name can only use letters, numbers, and underscores. It will be automatically rendered using spaces everywhere inside Pavior.

Custom attribute name

Rendered as

isActiveAffiliate

Is Active Affiliate

twitterHandle

Twitter Handle

Each attribute must also have a type. This represents the kind of data that can be stored in the attribute. Right now, Pavior supports three types: string, number, and date. Attributes that end with At, _at, On, or _on must always be dates.

Adding a new custom attribute

There are a few different ways to add the custom attributes to Pavior:

From the users list page

Go to [MDX CODE], then click the gear icon at the top right of the table to modify columns. Click "Add new attribute", then add your attribute.

Using bulk import

This allows you to create or update attributes for lots of users at once. Go to [MDX CODE], then choose a CSV file full of users and related data to upload. Our import wizard will ask you which columns you want to import into Pavior, and which attributes to map them to. You'll have a chance to create a new custom attribute if required.

Using the API

You can use the Pavior('init', ...) and Pavior('update', ...) calls to create and update custom attributes directly from your website. Read our API reference for details.

Feedback or clarification