I have two test features set up, each with a set of variations to return a random number between 3 and 9. Both are set to split users by
id
and include 100% of users in the experiment. Both are enabled for the environment, and the SDK panel shows I'm connected to my site. I've set the
id
to the GA4
clientId
, and I've confirmed it's being set — dumping the GB object shows context.attributes.id is "559138431.1675724983" for me. evalFeature on either of the features returns
{value: null, on: false, off: true, source: "unknownFeature", ruleId: ""}
and in the Chrome extension they're coming back as "> Skip because missing hashAttribute > Use default value"
/*...*/
clientId = await new Promise((resolve, reject) => {
gtag('get', gaPropertyId, 'client_id', function(id) {
resolve(id);
});
/*...*/
const gb = new GrowthBook({
apiHost: "<https://cdn.growthbook.io>",
clientKey: sdkKey,
enableDevMode: true,
attributes: {
id: clientId
},
/*...*/