How to A/B test a recommendation strategy - For API clients
This guide is dedicated to people who are implementing Recommendations manually via API and who want to be able to run remotely some A/B tests or personalizations.
Requirements
Recommendations & Merchandising access
Feature Experimentation & Rollout access
Differences with basic R&M API integration:
Increased latency versus basic R&M integration (+30 to 100ms)
Overviews
Initial configuration
Implement your strategy via API (Need a developer)
Select the FE&R SDK that best fits you and configure it
Fetch FE&R flags and retrieve the flag
Reco_{block_name}which should contains the strategy id that you want to push on your specific recommendation block. Make sure that visitor id is of type a stringCall the Recommendations API by passing the value of the flag
Reco_{block_name}as the strategy id. Don't forget to manually provide a fallback hardcoded strategy ID
https://uc-info.eu.abtasty.com/v1/reco/${SITE_ID}/recos/${strategy_id}?variables=${query}&fields=${fields}Use the results of the Recommendations API to display your recommendation block
Your code is ready to display your current strategy or future A/B tests
Add FE&R tracking (Need a developer)
Implement the following trackers:
click_on_product: via an Event tracker (documentation)add_product_to_card: via an Event tracker (documentation)purchase: via a Transaction hit tracker (documentation)
Tracking documentation: Tracking data with SDKs or Tracking with custom API calls
Create a FE&R "Feature toggle" campaign
Go to Feature Experimentation > Campaigns
Click on "Create campaign" > "Feature toggle"
Name:
{block_name} deploymentType: Feature toggle
Folder: Pick the folder of your choice
Define your scenario
Reco_{block_name}= Your recommendation strategy ID
Define your goals, we recommend adding the 3 trackers
Keep default parameters for targeting & delivery strategy
Take your campaign live
Running an A/B test
Create a FE&R "A/B test" campaign
Main information:
Name:
{block_name} A/B testFolder: folder of your choice for the campaign
Variations:
Original: Set flag
Reco_{block_name}to original strategy idVariation: Set flag
Reco_{block_name}to your variant strategy id
Goals: Pick the goals you want to track
Targeting: All users
Traffic allocation: 50/50
Last updated
Was this helpful?

