@@ -17,28 +17,29 @@ Data model
1717 - Experiments:
1818 - Experiments and experiment alternatives are automatically created when first
1919 occurrence in a template or view code appears. They are stored in table ` experiments_experiment `
20-
21- +-----------+-------------+---------------+---------------------+--------------------+-------+------------+----------+
22- | name (PK) | description | alternatives" | relevant_chi2_goals | relevant_mwu_goals | state | start_date | end_date |
23-
20+ ```
21+ +-----------+-------------+---------------+---------------------+--------------------+-------+------------+----------+
22+ | name (PK) | description | alternatives" | relevant_chi2_goals | relevant_mwu_goals | state | start_date | end_date |
23+ ```
24+
2425 - Enrolments
2526 - Bots are ignored
2627 - Session-based users are enroled based on session id **STORED WHERE?**
2728 - Logged in users are enroled based on their user id using table `experiments_enrollment`
28-
29- +-----+-----------------+-----------+-------------+---------------+---------+
30- | id | enrollment_date | last_seen | alternative | experiment_id | user_id |
29+ ```
30+ +-----+-----------------+-----------+-------------+---------------+---------+
31+ | id | enrollment_date | last_seen | alternative | experiment_id | user_id |
32+ ```
3133
3234 - Goals:
3335 - Definitions, goals must be created in advance and described in `settings.EXPERIMENTS_GOALS`.
3436 - Counters are stored in Redis using the following key names:
35-
36- COUNTER_CACHE_KEY = 'experiments:participants:'
37- PARTICIPANT_KEY = '%s:%s:participant' % (experiment.name, alternative_name)
38- COUNTER_FREQ_CACHE_KEY = 'experiments:freq:%s'
39- GOAL_KEY = '%s:%s:%s:goal' % (experiment.name, alternative_name, goal_name)
40-
41-
37+ ```
38+ COUNTER_CACHE_KEY = 'experiments:participants:'
39+ PARTICIPANT_KEY = '%s:%s:participant' % (experiment.name, alternative_name)
40+ COUNTER_FREQ_CACHE_KEY = 'experiments:freq:%s'
41+ GOAL_KEY = '%s:%s:%s:goal' % (experiment.name, alternative_name, goal_name)
42+ ```
4243
4344Request-response cycle
4445----------------------
0 commit comments