Skip to main content
Entity relation tables connect anonymous users to authenticated users for experimentation.

Create the Entity Relation Table

1

Open the entity that should own the relation

Open the entity that you randomize on (for example, Visitor).
2

Go to the Entity relation tables section

In the Entity relation tables section, click Create.
3

Input a SQL query

Input a SQL query that outputs two columns that specifies the mapping between the entities.
4

Select the columns and target entity

Select the columns and the target entity (for example, User).
5

Click Create

Confidence doesn’t clean the data coming from this table, so it’s important that it’s of high quality to ensure trustable experiment results. Any required data cleaning can either be done before the data ends up in the relation table, or inline in the table definition since it can be any SQL query.Below is a short description of possible error cases and how those would affect the results, using the Visitor to User case as an example:
  • No mapping exists for a visitor ID: For metrics with padding enabled, the user is included in the calculation of the metrics for the experiment, but get 0 as the metric value. Otherwise, the user is excluded.
  • Multiple visitor ID’s map to the same user: The user would be included once, with first exposure set to the earliest assignment for the visitor ID.
  • One visitor ID maps to multiple users: All users mapped to the visitor ID would be considered exposed to the experiment.

Create the Experiment

With the entity relation table in place, you can now create the experiment.
1

Create an experiment

Create an experiment and choose the entity that owns the relation as the entity to randomize on.
2

Select metrics from both entities

When selecting metrics you should now see metrics from both entities in the metric picker that you can then configure as in any other experiment.