• React

  • Browser

Group Users

If users are part of a larger grouping like a business or entity you can use groupings to automatically aggregate user data

Import Swishjam into your component

import { swishjam } from '@swishjam/core';

Group Users

swishjam.setOrganization('your-unique-organization-identifier', {
  name: 'Google',
  // other attributes
})

Full Example

export default function YourComponent() {
  const clickHandler = () => {
    swishjam.setOrganization('your-unique-organization-identifier', {
      name: 'Google',
      // other attributes
    })
  }

  return (
    <button onClick={(e) => clickHandler(e)}>
      Login
    </button>
  )
}