Hey, all. I searched through the questions here, but couldn't find an answer exactly pertinent to my...
j

Jace Wardell

12 months ago
Hey, all. I searched through the questions here, but couldn't find an answer exactly pertinent to my situation. I'm implementing sticky bucketing through the JS SDK. I've followed all the steps and my localStorage is successfully saving/retrieving the data; however, it seems like I either don't understand the fallback attribute or it's not working as expected. I created an experiment with these settings:
{
  "changeId": "33ebe0084e37e6d4ebc64a320b2f00510291115ec92178e81b61125a1bd40b83",
  "status": "running",
  "hashVersion": 2,
  "hashAttribute": "customerNumber",
  "urlPatterns": [
    {"include": true, "type": "simple", "pattern": "<http://localhost:4200/home>"}
  ],
  "meta": [
    {"key": "0", "name": "Control"},
    {"key": "1", "name": "Variation 1"},
    {"key": "2", "name": "Variation 2"},
    {"key": "3", "name": "Variation 3"},
    {"key": "4", "name": "Variation 4"},
    {"key": "5", "name": "Variation 5"}
  ],
  "filters": [],
  "seed": "sticky_test4",
  "name": "sticky_test4",
  "phase": "0",
  "coverage": 1
}
customerNumber
is my logged-in id, so it won't always be present in my user attributes. I also have an anonymous id (
anonId
) that always appears in the user attributes and is being used as my fallback attribute. My understanding is that if
customerNumber
isn't present (aka the user is logged out), my
anonId
will then be used to evaluate the experiment; however, I'm getting this error message in my Debug Log: > > Skip because missing hashAttribute After reading the docs, my expectation is that the fallback attribute would take the place of the hash attribute and I shouldn't get this error. Something else to note is that if I create an experiment using the
anonId
as the primary attribute instead of the
customerNumber
, the experiment works fine, so it's not an issue with setting the user attributes incorrectly. Any help would be appreciated because I can't find any information about this error or that the fallback can't be used as a hash attribute.