Pre-launch QA
Why Use Cookie Targeting?
Before rolling out a test to all visitors, you can restrict it to only people with a specific browser cookie. This lets you validate the test privately before going live.
How to Test with Cookies
1. Create Your Test with a Cookie Rule
- Create your test as usual (set page URL, variants, etc.)
- In the User Targeting section, add a cookie rule:
- Cookie name: pick any unique name (e.g., my_test_cookie)
- Value: true
- Activate the test
Only users with this cookie will see the test. Everyone else is unaffected.
2. Set the Cookie on Your Browser
Open your browser's developer console (right-click the page, click "Inspect", go to "Console") and paste:
document.cookie = "my_test_cookie=true;path=/";
localStorage.removeItem("crowainm");
localStorage.removeItem("crowaivc");
location.reload();
Replace my_test_cookie with whatever cookie name you chose in step 1.
3. Verify the Test
- Browse the target pages and confirm the variant appears correctly
- Check the CrowAI dashboard to see your test view recorded
4. Go Live to All Visitors
Once you are happy with the test:
- Click "Flush Data" on the test to reset all data
- Remove the cookie rule from User Targeting
- Set your desired traffic split (e.g., 50/50)
- Save
The test now runs for all visitors with a clean data start.
5. Clean Up Your Cookie
After going live, remove the test cookie from your browser:
document.cookie = "my_test_cookie=;path=/;expires=Thu, 01 Jan 1970 00:00:00 GMT";
localStorage.removeItem("crowainm");
localStorage.removeItem("crowaivc");
location.reload();
Important
- Always set the cookie rule before activating the test
- Do not add a cookie rule to a test that is already live — visitors who already saw the test will keep seeing it regardless of the new rule
- Always flush data before removing the cookie rule and going live, so your results only include real audience data