useBuyerAttributes
The useBuyerAttributes hook fetches shopping preference signals for personalization. Returns genderAffinity (MALE, FEMALE, or NEUTRAL) and categoryAffinities (list of product taxonomy categories the user engages with). Use this data to customize product recommendations, filter content, or tailor messaging. This is privacy-sensitive data derived from the user's Shop activity, always handle respectfully and transparently in your UI.
Caution
This hook requires adding the following scopes to the manifest file:
profile
For more details, see manifest.json.
Caution:
This hook requires adding the following scopes to the manifest file:
profile
For more details, see manifest.json.
Anchor to useBuyerAttributes-parametersParameters
- Anchor to paramsparamsparamsUseBuyerAttributesParamsUseBuyerAttributesParams
UseBuyerAttributesReturnsUseBuyerAttributesReturns
UseBuyerAttributesParams
- fetchPolicy
DataHookFetchPolicy - skip
boolean
DataHookFetchPolicy
'cache-first' | 'network-only'UseBuyerAttributesReturns
- buyerAttributes
BuyerAttributes | null - error
Error | null - loading
boolean - refetch
() => Promise<void>
BuyerAttributes
- categoryAffinities
TaxonomyCategory[] - genderAffinity
Gender
TaxonomyCategory
- ancestors
TaxonomyCategory[] - id
string - name
string
Gender
'MALE' | 'FEMALE' | 'NEUTRAL'Was this page helpful?