Hi! I've encountered an issue repeatedly where Gro...
# experimentation
c
Hi! I've encountered an issue repeatedly where Growthbook fails to activate my A/B tests, citing the error "Skip because missing hashAttribute". In this instance, the "hashAttribute" is set to "user_id", but I've also observed the same error when using "id". Could you please explain the root cause of this issue and advise on how to rectify it?"
👀 2
image.png
h
How are you setting the user's attributes in your SDK? If they are missing, enrollment will fail.
c
Hi! We set the user's attributes in our SDK initialization under the
attributes
object. Here’s how we do it: attributes: { id: clientId, // Retrieved from gtagApiResult.client_id user_id: {{dlv - businessPartnerId}}, // Retrieved from dataLayer variable mobile: isMobile, // Boolean based on user agent market_type: {{lt - segment_id}} // Retrieved from another dataLayer variable }
The
user_id
attribute is populated from Google Tag Manager. I checked our implementation, and based on debugging, we can confirm that it has a valid string value (e.g.,
"212810946"
) when the GrowthBook script runs. However, we still get the error
"Skip because missing hashAttribute"
. Could this be related to the expected data type or how GrowthBook reads the attributes? Is there a way to debug which attributes GrowthBook receives at runtime to verify that
user_id
is correctly passed?
s
Is this on a web page? Using our dev tools will show the current attributes that GrowthBook is seeing. https://docs.growthbook.io/tools/chrome-extension
c
yes, i did so, and it showed us there are no attributes growthbook can use
s
Can you share your SDK implementation?