I am setting userProperties for custom defined property (scope user) and userId in analytics using setUserProperties and setUserId, and fetching remote config based on the setted properties. but i am getting default config at first, but when any user comes again then it returned config are as per previous setted properties irrespective of the user.
This is the code snippet.
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
const remoteConfig = getRemoteConfig(app);
export const firebaseInit = async (userId, testProperty) => {
// setting userId and userProperties
setUserId(analytics, userId);
setUserProperties(analytics, { testProperty: testProperty });
// Fetching and activationg config
remoteConfig.settings.minimumFetchIntervalMillis = 1000;
const isActivated = await activate(remoteConfig);
await fetchConfig(remoteConfig);
const allConfig = getAll(remoteConfig);
};
I was expecting get correct config based and setted properties and i was setting userId to identify the user when it comes next time and get correct config.