Skip to main content
The useUser() hook enables you to add properties and send tracking events to the current user.

About this hook

The hook contains the following methods:
Promise that sends tracking events for the current user
Promise that adds properties to the current user
Update the userID in the top-level Frigade.Provider component to change users

Example use cases:

  • Tracking events and adding properties to the current user for using with Targeting
  • Wrapping the track method with your existing tracking/analytics methods

Tracking events example

Adding properties example

Properties can also be added to the userProperties object via the Frigade.Provider component:
Make sure to call any Frigade hook within the context of <Frigade.Provider />

Standardized properties

The following standardized properties are automatically added to the user object if provided via addProperties:
  • email - The user’s email address
  • name - The user’s full name
  • firstName - The user’s first name
  • lastName - The user’s last name
  • imageUrl - The user’s profile image URL