Because of how GrowthBook works, we can collect a variety of contextual attributes with just the exposure events rather than all of the events. We would then make these available as dimensions using experiment assignment queries, for example:
SELECT experiment.subject_id AS subject_id, -- required FROM_ISO8601_TIMESTAMP(meta.dt) AS timestamp, -- required experiment.enrolled AS experiment_id, -- required experiment.assigned AS variation_id, -- required meta.domain AS site_domain, mediawiki.database AS mediawiki_database, IF(performer.is_logged_in, 'Logged-in', 'Logged-out') AS user_auth_status, IF( agent.client_platform_family = 'desktop_browser', 'Desktop', 'Mobile' ) AS user_platform, mediawiki.skin AS mediawiki_skin FROM event.product_metrics_web_base WHERE experiment.coordinator = 'xLab' AND action = 'experiment_exposure'
creates 5 dimensions by which experiment results could be broken down by:
- site_domain (e.g. "en.wikipedia.org")
- user_auth_status ("Logged-in", "Logged-out")
- user_platform ("Desktop", "Mobile")
- mediawiki_skin (e.g. "vector-2022", "minerva")
Those attributes do not have to be present in any of the interaction data we collect from subjects during the experiment, it is enough to collect those attributes at exposure time only.
Contextual attributes
Per T414730#11602311, the set of desired contextual attributes for v0.1 includes:
- agent_client_platform_family (already included)
- performer_is_logged_in
- performer_is_temp
- performer_is_bot
- mediawiki_database
A separate follow-on task should cover adding any more attributes beyond these initial 4.
Acceptance criteria
- The desired set of contextual attributes are collected with experiment exposure events.
- logExposure in JS SDK
- logExposure in PHP SDK
- These contextual attributes are collected in addition to (UNION) any contextual attributes the experiment is configured with (see also T408186)