How to integrate Amp.ai with an existing A/B testing system

Ajay Bhoj

Dec 03, 2018

Introduction

In an earlier post on An Overview of Server-side Integrations with Amp.ai, we discussed high-level concepts related to server-side integrations. In this post, we'll discuss integrating Amp.ai with an existing A/B testing system on the server side. If you already use an in-house A/B testing system, Amp.ai can be purely additive, and complement it very well. Most importantly, Amp.ai can boost your key metrics without requiring any major changes to your A/B testing infrastructure. For a quick introduction to the key concepts in Amp.ai that are necessary to follow this post, please see Amp.ai vs A/B Testing: A paradigm shift

UserId based session management: An example

A/B testing frameworks generally assign a user to a "variant-group" based on a function that maps the user identifier or UserId to the variant-group. While integrating with Amp.ai, it is possible to compose sessions solely based on UserIds, requiring no changes to your A/B testing framework.

Let us dive deeper with an example. In the campaign optimization example shown below (also see our post on How to integrate with Amp.ai on the server side using AmpTokens), the Context event is extracted from the browser user-agent, the Decision event is used to decide which campaign slogan to show, and the Outcome event is triggered when a visitor clicks the donate button. The objective of the optimization is to improve chances of a donation by picking the best campaign slogan.

SS-Blog1.002.png#asset:833


To implement the above, we can use the UserId provided by the A/B testing system or any identifier that serves as a proxy to UserId. An example architecture is shown below:

SS-Blog2.001.png#asset:838


Some observations:

Implementation pseudocode is shown below:

SS-Blog2.002.png#asset:839

The above is very similar to session management with AmpTokens, described in How to integrate with Amp.ai on the server side using AmpTokens

Summary

In this post, we explored an example server-side integration with Amp.ai that used UserId based session management, where UserIds could be supplied by an A/B testing framework or any user identification service. To summarize, Amp.ai can be a great addition to your A/B testing setup as it:

For more information, contact us here or email us at support@amp.ai. Schedule a demo here