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

About this hook

The hook contains the following methods:
Promise that sends tracking events for the current group
Promise that adds properties to the current group
Promise that sets the current group ID. Using this hook can cause unexpected behaviors if also setting the group ID at the <Frigade.Provider /> level.

Example use cases:

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

Example usage:

Make sure to call any Frigade hook within the context of <Frigade.Provider />

Standardized properties

The following standardized properties are automatically added to the group object if provided via addProperties:
  • name: The name of the group/company/organiation
  • imageUrl: The URL of the group/company/organiation’s logo