I am trying to create a dimension where I can spli...
# announcements
r
I am trying to create a dimension where I can split the users by the registration date, and I saw the example in the docs about it but I do not understand exactly what is meant by "super" event. What we want is to split all events by registration date so do we need to add the registration date to every single event? is there a better way of doing that? "You can also reference the experiment start/end date in your javascript expression. For example, if you add a super event called
userRegistrationDate
that stores a unix timestamp, you could make a
New vs Existing
dimension like this"
f
Hi Rodolfo, by registration date, do you mean when they were enrolled into the experiment?
r
Nope, the date he registered in our system
f
are you able to set that date in the SDK?
as one of the user attributes?
r
Yes I am, this is exactly why I asked here, can I use user attributes in dimensions? So far I thought I could only use event attributes
f
yes, so as a user attribute it can be used as the randomization unit. To use it as a dimension, you will need to get that attribute from your data warehouse. (or you can pass it in with the experiment tracking callback)
r
Hmm I do not get exactly how, right now we use mixpanel and I am able to set this as an user attribute in growthbook. What you mean is that in mixpanel I will somehow have to pass this as an event attribute for all events?
f
not for all events - let me check for mixpanel
okay
do you have the registration date already in mixpanel?
r
Not yet
f
When you create a dimension in GrowthBook under the analysis section, for mixpanel, you use the javascript query language they have to pull that value.
you can do something like this:
Copy code
(() => {
    // event
    let regDate = "none";
    for (let j = 0; j < events["length"]; j++) {
        if (events[j].properties["registrationDate"]) {
            regDate = events[j].properties["registrationDate"];
            break;
        }
    }

    return regDate;
})()
r
But this is what I mentioned earlier, from the docs it looks like I can only use event properties not user attributes. But is it possible to get the user attribute there from the event?
f
we don’t automatically pass in the user attributes in the tracking call
but you can add additional parameters in it, and use that
r
so I would have to add to every single event?
f
no, I don’t believe so
just the experiment track callback one should be enough
r
I see, the tracking call back, but that one is done for example in a moment the user is not yet registered so there is not date to send
f
do you fire an event when the user does register? That seems like something you should have anyway
r
we do, but can I use one event alone to create a dimension for all events? We do have a signup event already
f
I’d have to check with jeremy - but you should be able to test it out pretty easily
r
Any updates? 😅
f
@future-teacher-7046 Can you confirm?
f
We don't currently support user properties in Mixpanel, but it's something we have talked about adding. I'll make a GitHub issue for it.
r
Thank you @future-teacher-7046