We are trying to utilize the Salesfroce audience feature to give a personalized experience to the customers.
In our use case, we have a customer community for guest users(not using customer community licences). When they log in to actual website e.g. XYZ.com and when the community is loaded we are getting the user context based in the community from some API calls to XYZ. So the context will not be actual salesforce community licensed user but it will be the user logged in to XYZ product website.
In order to customize the pages in community, based on audience we are limited with the options in criteria as Custom/Standard permissions, User, Location, Domain, etc but in all documents referred for the audience, I don't see any option to differentiate the users based on the responses that I will be receiving from API, meaning will not be able to add criteria for the audience based on some API or some custom apex logic or some Javascript logic from Lightning components or any anything.
Please suggest what could be the alternatives to create such audiences so that the components rendered in the community pages can be dynamic based on the audience criteria that we will have from any custom logic.