Launching an A/B Test
This use case shows how to use the Target APIs to create an A/B activity containing two offers that are targeted to male visitors from San Francisco.
An activity determines the experiences--the content of a page--a site visitor might encounter. Target enables you to test different experiences to determine which will be most successful. An activity compares two or more experiences against the success metrics you specify so you can choose the experience that is most likely to provide the results you want.
For example, you might design an activity that tests two different landing pages, one that highlights offers for women's summer shoes, and one that highlights more general summer apparel. The activity determines the conditions that control when each of these landing pages appears, and the metrics that determine which page is more successful. The activity is configured to start and end when specific conditions are met, such as between specific dates, or to start when the activity is approved and to end when it is deactivated.
An offer is the content displayed within a specific location such as banner zone on a Web page. When you test your Web pages, you measure the success of each experience which is made up of a combination of offers.
An offer can contain different types of content, including: Image, Text, HTML, Link, Button
For example, a Web page might display either of two offers, depending on whether the visitor has been to your site before.
An activity references its offers by id, so the offers need to be created before the activity is created.
Find Existing Offers
To look for existing offers, list your offers with a GET request:
Create New Offers
Create new offers with a POST request:
Audiences define the target for your activity and are used anywhere where targeting is available. Target audiences are a defined set of visitor criteria. Offers can be targeted to specific audiences (or segments). Only visitors who belong to that audience see the experience that is targeted to them.
For example, you might target an activity to an audience made up of visitors who use a particular browser or operating system. Or, your campaign might be targeted at visitors from one geographical region, or people who access your page from a certain search engine.
An activity references its offers and audience by id, so these need to be created before the activity is created.
Find Existing Audiences
To look for existing audiences, list your audiences with a GET request:
Create New Audiences
Create new audiences with a POST request:
Activities enable you to test page designs and target content to specific audiences. An activity targets specific content to a particular audience.
Create a new activity with a POST request:
The response to the create activity request provides the id field, which can be used to apply any updates.
Content includes the offers, image assets, or other HTML elements (such as links) that appear on the page to help drive the visitor toward the result you desire. Target combines locations, offers, and experiences to determine which content appears on your site during a specific test.
Use the server-side delivery API to deliver offer content.
To deliver the experience you've created, use this POST request: