Important: This implementation is relevant only to sections without any API campaigns. If you run API campaigns, see Global Control Group (GCG) guide for API.
The global control test is a method for measuring the overall impact of your experimentation program. You measure this using an A/B test that splits your overall traffic into two groups – users who receive personalized Dynamic Yield experiences and those who don’t – and compares them.
For example:
95% of users get Dynamic Yield experiences These users are served multiple experiences you want to measure the impact of. |
5% of users are the control group These users receive, to the extent possible, a non-Dynamic Yield experience. |
Experience A: PDP Recommendations | – |
Experience B: Exit Intent | – |
Experience C: Personalized HP Banners | Experience C (baseline): Static HP Banners |
By comparing the performance of the Dynamic Yield Experiences and Control Group variations, you can estimate the total impact of experiences A, B, and C.
Setting up the global control test
Step 1: Create a global control group A/B test Split users into Dynamic Yield experiences and control group variations. Each user allocation is stored in cookies and local storage. This test's results are used to measure the impact. (One-time setup) |
Step 2: Create an evaluator to target users with variations The evaluator reads the stored user assignments to each variation and then surfaces them to use for targeting. (One-time setup) |
Step 3: Add experiences to the test and then target variations These are the experiences whose impact you want to measure. Use the evaluator value to target the experiences to a specific variation of the global control test. |
Step 1: Create the global control test
Create a Custom Code campaign using the following settings:
- Name the campaign Global Control Test.
- Set the trigger as Page Load.
- Set the frequency to Session.
- Create an experience with the name Global Control Test.
- Leave targeting conditions as they are, targeted to all users.
- Create a variation called Dynamic Yield Experiences with the following JavaScript code:
var GCG_STORAGE_NAME = '_dy_cs_gcg'; var CG_VALUE = 'Control Group'; var DY_VALUE = 'Dynamic Yield Experiences'; var STORAGE_TYPE = 'cookieStorage'; window.DYO.StorageUtils.remove(GCG_STORAGE_NAME, [STORAGE_TYPE]); window.DYO.StorageUtils.set(GCG_STORAGE_NAME, DY_VALUE, [STORAGE_TYPE]);
- Create another variation called Control Group with the following JavaScript code:
var GCG_STORAGE_NAME = '_dy_cs_gcg'; var CG_VALUE = 'Control Group'; var DY_VALUE = 'Dynamic Yield Experiences'; var STORAGE_TYPE = 'cookieStorage'; window.DYO.StorageUtils.remove(GCG_STORAGE_NAME, [STORAGE_TYPE]); window.DYO.StorageUtils.set(GCG_STORAGE_NAME, CG_VALUE, [STORAGE_TYPE]);
- Set the allocation to 95% for Dynamic Yield Experiences and 5% for Control Group.
- Publish the campaign after validating the stickiness is set to "Sticky for the user (multi-session)" inside the cogwheel icon.
Note: While the setup works regardless of the campaign and experience names you choose, we strongly recommend that you use the naming conventions outlined in this procedure.
Step 2: Create the evaluator
The evaluator is used to target experiences to the Dynamic Yield Experiences group or the Control Group.
- Create an evaluator with the name Global Control Test Group.
- Set the value type to String.
- Set Expected Values to Dynamic Yield Experiences and Control Group.
- Insert the following code:
(function () { return DYO.Q.Promise(function (resolve, reject) { var GCG_STORAGE_NAME = '_dy_cs_gcg'; var STORAGE_TYPE = 'cookieStorage'; window.DY.CS = window.DY.CS || {}; if (window.DY.CS.inGlobalControl) { resolve(window.DY.CS.inGlobalControl); return true; } getGCCookie(); function getGCCookie() { var GCValue = window.DYO.StorageUtils.get(GCG_STORAGE_NAME, [STORAGE_TYPE]); if (GCValue) { window.DY.CS.inGlobalControl = GCValue; resolve(GCValue); } else { setTimeout(function () { getGCCookie(); }, 50); } } }); })();
- Save the evaluator.
Step 3: Add experiences to the global control test
Adding experiences to the global control test is an ongoing process. If you have a personalized experience, target it (using the evaluator you just created) to the Dynamic Yield Experiences group. This ensures that only users in the 95% population group receive this experience.
If the campaign requires a default experience (served to all traffic, including the 5% control group), create the experience and serve it to the control group using the same evaluator.
If you are using active cookie consent, consider having a second fallback experience with no targeting conditions that can be served to opted-out users.
Best practices: What should you measure?
- Consult your Customer Success Manager regarding personalization and testing efforts to include to best measure the value of your personalization program.
- Don't include experiences that have no effect on the user's experience.
For example, firing an event or implementing a cookie. - Don't include experiences that must be served and are not optimized.
For example, cookie consent notification.
Note: As with any A/B test, there is a small opportunity cost inherent to reserving a small group that is not served Dynamic Yield experiences. However, the tradeoff of the cost is that you can at the same time measure the impact of your personalization program.