https://www.growthbook.io/ logo
r

rhythmic-chef-84815

10/20/2022, 7:21 AM
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

fresh-football-47124

10/20/2022, 7:18 PM
Hi Rodolfo, by registration date, do you mean when they were enrolled into the experiment?
r

rhythmic-chef-84815

10/21/2022, 6:23 AM
Nope, the date he registered in our system
f

fresh-football-47124

10/21/2022, 6:32 AM
are you able to set that date in the SDK?
as one of the user attributes?
r

rhythmic-chef-84815

10/21/2022, 6:33 AM
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

fresh-football-47124

10/21/2022, 6:38 AM
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

rhythmic-chef-84815

10/21/2022, 6:39 AM
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

fresh-football-47124

10/21/2022, 6:40 AM
not for all events - let me check for mixpanel
okay
do you have the registration date already in mixpanel?
r

rhythmic-chef-84815

10/21/2022, 7:12 AM
Not yet
f

fresh-football-47124

10/21/2022, 7:13 AM
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

rhythmic-chef-84815

10/21/2022, 7:15 AM
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

fresh-football-47124

10/21/2022, 7:15 AM
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

rhythmic-chef-84815

10/21/2022, 7:16 AM
so I would have to add to every single event?
f

fresh-football-47124

10/21/2022, 7:18 AM
no, I don’t believe so
just the experiment track callback one should be enough
r

rhythmic-chef-84815

10/21/2022, 7:19 AM
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

fresh-football-47124

10/21/2022, 7:39 AM
do you fire an event when the user does register? That seems like something you should have anyway
r

rhythmic-chef-84815

10/21/2022, 7:39 AM
we do, but can I use one event alone to create a dimension for all events? We do have a signup event already
f

fresh-football-47124

10/21/2022, 7:56 AM
I’d have to check with jeremy - but you should be able to test it out pretty easily
r

rhythmic-chef-84815

10/31/2022, 8:17 AM
Any updates? 😅
f

fresh-football-47124

10/31/2022, 8:24 AM
@future-teacher-7046 Can you confirm?
f

future-teacher-7046

10/31/2022, 11:37 AM
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

rhythmic-chef-84815

10/31/2022, 1:39 PM
Thank you @future-teacher-7046
2 Views