2. Create an Experience Targeting (XT) activity
-
In Adobe Target, navigate to the Activities page, then select Create Activity > Experience Targeting.
-
In the Create Experience Targeting Activity modal, leave the default Web option selected (1), select Form as your experience composer (2), select a workspace and property (3), and click Next (4).
3. Define a personalized experience per audience
-
In the Experiences step of activity creatio, click Change Audience to create an audience of those visitors who want to travel to San Francisco, California.
-
In the Create Audience modal, define a custom rule where
destinationCity = San Francisco
. This defines the group of users who want to travel to San Francisco. -
Still in the Experiences step, enter the name of the location (1) within your application where you want to render a special offer regarding the Golden Gate Bridge, but only for those headed to San Francisco. In the example shown here, homepage is the location selected for the HTML offer (2), which is defined in the Content area.
-
Add another targeting audience by clicking Add Experience Targeting. This time, target an audience that would like to travel to New York by defining an audience rule where
destinationCity = New York
. Define the location within your application where you want to render a special offer regarding the Empire State Building. In the example shown here,homepage
is the location selected for the HTML offer (2), which is defined in the Content area.
4. Verify personalized experience per audience
In the Targeting step, verify you have configured the desired personalized experience per audience.
5. Set up reporting
In the Goals & Settings step, choose Adobe Target as the Reporting Source to view activity results in the Adobe Target UI, or choose Adobe Analytics to view them in the Adobe Analytics UI.
6. Add metrics for tracking KPIs
Choose a Goal Metric to measure the success of the activity. In this example, a successful conversion is based on whether the user clicks on the personalized destination offer.
7. Implement your personalized offers in your application
const TargetClient = require("@adobe/target-nodejs-sdk");
const CONFIG = {
client: "acmeclient",
organizationId: "1234567890@AdobeOrg"
};
const targetClient = TargetClient.create(CONFIG);
targetClient.getOffers({
request: {
execute: {
pageLoad: {
parameters: {
destinationCity: "San Francisco"
}
}
}
}
})
.then(console.log)
.catch(console.error);
ClientConfig config = ClientConfig.builder()
.client("acmeclient")
.organizationId("1234567890@AdobeOrg")
.build();
TargetClient targetClient = TargetClient.create(config);
Context context = new Context().channel(ChannelType.WEB);
ExecuteRequest executeRequest = new ExecuteRequest();
RequestDetails pageLoad = new RequestDetails();
pageLoad.setParameters(
new HashMap<String, String>() {
{
put("destinationCity", "San Francisco");
}
});
executeRequest.setPageLoad(pageLoad);
TargetDeliveryRequest request = TargetDeliveryRequest.builder()
.context(context)
.execute(executeRequest)
.build();
TargetDeliveryResponse offers = targetClient.getOffers(request);
8. Implement code to track conversion events
//... Code removed for brevity
//When a conversion happens
TargetClient.sendNotifications({
targetCookie,
"request" : {
"notifications" : [
{
type: "click",
timestamp : Date.now(),
id: "conversion",
mbox : {
name : "destinationOffer"
}
}
]
}
})
ClientConfig config = ClientConfig.builder()
.client("acmeclient")
.organizationId("1234567890@AdobeOrg")
.build();
TargetClient targetClient = TargetClient.create(config);
Context context = new Context().channel(ChannelType.WEB);
ExecuteRequest executeRequest = new ExecuteRequest();
RequestDetails pageLoad = new RequestDetails();
pageLoad.setParameters(
new HashMap<String, String>() {
{
put("destinationCity", "San Francisco");
}
});
executeRequest.setPageLoad(pageLoad);
NotificationDeliveryService notificationDeliveryService = new NotificationDeliveryService();
Notification notification = new Notification();
notification.setId("conversion");
notification.setImpressionId(UUID.randomUUID().toString());
notification.setType(MetricType.CLICK);
notification.setTimestamp(System.currentTimeMillis());
notification.setTokens(
Collections.singletonList(
"IbG2Jz2xmHaqX7Ml/YRxRGqipfsIHvVzTQxHolz2IpSCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="));
TargetDeliveryRequest targetDeliveryRequest =
TargetDeliveryRequest.builder()
.context(context)
.execute(executeRequest)
.notifications(Collections.singletonList(notification))
.build();
TargetDeliveryResponse offers = targetClient.getOffers(request);
notificationDeliveryService.sendNotification(request);
9. Activate your Experience Targeting (XT) activity