For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to A/B test recommendation strategies using AB Tasty Web Extensions

This guide explains how to test two different recommendation algorithms or strategies on the same placement using AB Tasty for traffic splitting and experiment assignment cookie management.

Overview

The implementation relies on a clear separation of responsibilities.

AB Tasty side:

  • Creates the A/B test

  • Generates 2 variations: A and B

  • Randomly assigns visitors

  • Sets an experiment assignment cookie

Client or Agency side:

  • Reads the cookie set by AB Tasty

  • Interprets the assigned variation (A or B)

  • Triggers the corresponding call to the Merchandising & Recommendation API

AB Tasty Implementation

1

Create the test

Create an A/B test on the desired scope (product page, homepage, listing page, etc.) with two variations:

  • Variation A

  • Variation B

2

For each variation, AB Tasty sets a specific cookie identifying the assigned group.

Example:

  • Group A → ab_test_reco_1 = A

  • Group B → ab_test_reco_1 = B

The exact cookie name can be adapted to your technical conventions.

This cookie is:

  • Stored browser-side

  • Accessible through JavaScript

  • And allows the website to determine which variation the visitor belongs to

Client or agency implementation

1

The website must read the ab_test_reco_1 cookie.

Example:

const variation = getCookie("ab_test_reco_1");
2

Conditional Recommendation & Merchandising API call

Depending on the cookie value:

  • If variation=A → call Recommendation Strategy A

  • If variation=B → call Recommendation Strategy B

Technical considerations - execution timing

The experiment assignment cookie must be read:

  • After the AB Tasty script has been executed

  • Before triggering the Merch & Recos API

Notes

AB Tasty Side
Client Side

Test creation

Cookie reading

Traffic allocation

A/B interpretation

Cookie assignment

Conditional API call

  • AB Tasty manages the experimentation layer

  • The website controls which recommendation strategy is called

Last updated

Was this helpful?