Advice and answers from the UserGuiding Team
Users
Engagement
Settings
Sending User Attributes, Company Attributes and Tracking User Actions
Learn how to optimize your user segmentation by sending user/company attributes and tracking user actions.

Overview

User attributes and company attributes are essential information about your users that can be shared with UserGuiding. These attributes enable you to tailor your content to specific user groups, enhancing personalization and engagement.

 

On the other hand, user action is a custom piece of information about something your user does, which can also be tracked to enhance customization. Here's a breakdown of the process:

 

Sending User Attributes

User Identification Enabled

If you have enabled User Identification, use the window.userGuiding.identify() function to identify your end-users and send user attributes. Include the attributes within the function, as shown below:

 

window.userGuiding.identify(userId, {
name: "John Doe",
email: "[email protected]",
created_at: "2022/01/25",
isTrial: false,
numberOfGuides: 3
});

 

Please check this article if you prefer to send them through the UserGuiding User API.

 

Important: We only support strings (only letters), numbers, booleans, and these specific date formats. We do not accept arrays, lists, or nested objects as valid user attributes.

User Identification Not Enabled

If you choose not to enable User Identification, you can still send user attributes without a unique ID. However, keep in mind that you won't fully benefit from User Identification advantages:

 

window.userGuiding.identify({
name: "John Doe",
email: "[email protected]",
created_at: "2022/01/25",
isTrial: false,
numberOfGuides: 3
});

 

Sending Company Attributes

You can send company-level data to UserGuiding to track interactions and build segments accordingly. After enabling the User Identification, you can use the window.userGuiding.identify() function to identify your end-users and send company attributes. Include the attributes within the function, as shown below:

 

window.userGuiding.identify(userId, {
name: "John Doe",
email: "[email protected]",
created_at: "2022/01/25",
isTrial: false,
numberOfGuides: 3

// company id is required when sending company attributes
company: {
id: '1',
name: 'Awesome Company',
created_at: 1644403436643,
}
});

 

Important: The company ID is required here. We only support strings (only letters), numbers, booleans, and these specific date formats. We do not accept arrays, lists, or nested objects as valid user attributes.

 

Tracking User Actions

To target UserGuiding content based on user actions, follow the steps below.

 

Utilize the window.userGuiding.track() function, which is effective regardless of whether User Identification is enabled:

 

//e.g. "Clicked some Button"

window.userGuiding.track("action name");

//Tracking button click action

window.userGuiding.track("button click action", {
button: "home-cta"
});

//Another action idea

window.userGuiding.track("submit support ticket", {
url: "/support",
article: "installation"
});

 

Locating User Segmentation Data

Once you've sent user attributes or company attributes and tracked user actions, access the Users Page to find the data. Apply filters to segment users based on this information efficiently, helping you personalize your content and engagement strategies.

 

Did this answer your question?