All Collections
Users
Custom Attributes
Sending user attributes and tracking user actions
Sending user attributes and tracking user actions

Learn how to optimize your user segmentation with UserGuiding by sending user or company attributes and tracking user actions.

Gabriel avatar
Written by Gabriel
Updated over a week ago

Overview

User attributes are essential pieces of 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.

Sending User Attributes, Company Attributes and Tracking User Actions with UserGuiding

User attributes and tracked user actions are powerful tools for refining user segmentation within UserGuiding. Here's a breakdown of the process:

Sending User Attributes

  1. 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.
    โ€‹

  2. 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 company-level 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: {
});

Important: The ID of the company here is required. 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 these steps:

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 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 effectively personalize your content and engagement strategies.

Conclusion

By effectively sending user or company attributes and tracking user actions in UserGuiding, you can create powerful user segments and enhance user engagement. Utilize the provided functions and tools to optimize your targeting strategies and improve the user experience.

Did this answer your question?