• This function registers a callback to be notified when a matching group has been assigned.

    In most cases, the handler implementation is expected to send the group assignment information to your analytics system. This allows for tracking messaging eligibility as a metric across all sessions. A GRANIFY (or similar) matching group is eligible to see messages whereas a BASELINE (or similar) group is ineligible.

    Expect your handler to be invoked when a new session is started. No guarantees are made regarding the thread the handler will be invoked on.

    Parameters

    • groupAssignedListener: ((group: MatchingGroup) => void)

      The callback function that will be invoked when a group is assigned. The handler will take in a single parameter, group, which is the group that has been assigned.

    Returns void

    This function can be called at any time, but it is most usefully called prior to activate to ensure a handler is registered in advance of the group assignment taking place.

    The group that your handler receives when invoked is the exact group that should be reported in your analytics.
    IMPORTANT: ABSOLUTELY NO CHANGES ARE ALLOWED TO BE PERFORMED ON THE GROUP WHEN REPORTING IN YOUR ANALYTICS.