Skip to content

Integrate Adobe Audience Manager with Adobe I/O for Cross-Platform Targeting

Notifications You must be signed in to change notification settings

hirenoble/Cross-platform-Targeting-with-Adobe-Audience-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 

Repository files navigation

Cross-Platform Targeting with Adobe Audience Manager

Integrate Adobe Audience Manager with Adobe I/O for Cross-Platform Targeting

These instructions describe how to to implement cross-platform targeting solutions with Adobe Experience Cloud and Adobe I/O products integration. The solution uses below Adobe products:

  1. Introduction

  2. Set Up Products

  3. Watch the Solution Work

Solution Use Case

An anonymous user visits a retail website. The user visits the product page, selects a color and size of the product and adds the product into the cart. The user proceeds to checkout but before completing the transaction, leaves the website, abandoning the cart. The cart abandonment activity is captured in Adobe Audience Manager segment and the user profile is served on multiple platforms to create personalized experiences.

Solution Architecture

The following diagram shows the architecture for this solution:

aam architecture

What's Needed

To complete this solution, you will need authorization to use the following services:

  • Adobe Launch
  • Adobe Analytics/Triggers
  • Adobe I/O Events
  • Adobe I/O Runtime
  • Adobe Audience Manager APIs
  • Adobe Audience Manager
  • Adobe Target-Experience Targeting

To set up Adobe products for this solution:

  1. Set Up Adobe Launch

  2. Set Up Analytics Triggers

  3. Set Up Adobe I/O Runtime

  4. Set Up Adobe I/O Events

  5. Set Up Adobe Audience Manager

  6. Set Up Adobe Target

To set up Launch:

  1. On www.launch.adobe.com, click New Property.

    create new property

  2. On the Create Property box, provide the details for the new property and click Save.

    create property box details

  3. Click the Extensions tab and install the following extensions

    • Target
    • Analytics
    • ContextHub
    • Core
    • Experience Cloud ID Service

    extensions

  4. Click the Rules tab and create a Target rule with the following specifications:

    edit rule

  5. Similarly, create an Analytics rule with the following specifications:

    analytics rule

  6. For the Adobe Analytics - Set Variables action, click the </> Open Editor button at the bottom of the page and add the following custom script:

var cart=ContextHub.getItem("cart");
var profile=ContextHub.getItem("profile");
 
var price=[];
var items=[];
 
for(i=0;i<cart.entries.length;i++)
{
     price[i]=cart.entries[i].price;
     items[i]=cart.entries[i].title;
}
 
s.eVar4=price.join("|");
s.eVar5=items.join("|");
 
s.eVar8=_satellite.getVisitorId().getAudienceManagerLocationHint();
  1. Click the Environments tab and create the following environments:

    • Dev

    • Stage

    • Production

      create environments

  2. Save the rule and then click the Publishing tab.

  3. Click Add New Library button.

    add new library

  4. On the Create New Library form, specify a Name for the build and then select Dev (development) from the Environment drop down.

  5. Click the Add All Changed Resources button.

    specify build

  6. Under Development, select Build for Development in the library drop down.

    build for dev

  7. Approve and publish the library by selecting the appropriate option under the drop down arrow for each phase of the build workflow (Submitted and Approved).

    full flow

  8. Repeat this process for the Stage and Production environments as well.

  9. The last step in the workflow is to select Build and Publish to Production on the drop down arrow under Approved.

    build and publish to production

Triggers is a Marketing Cloud Activation core service that enables marketers to identify, define, and monitor key consumer behaviors, and then generate cross-solution communication to re-engage visitors. You can use triggers in real-time decisions and personalization.

For instructions on setting up Analytics Triggers, see Specifying a New Trigger.

To set up Triggers for this solution:

  1. Create a cart abandonment Triggers rule.

    cart abandonment rule

  2. Add the following dimensions:

    • Custom eVar 3
    • Custom eVar 4
    • Custom eVar 5
    • Custom eVar 6
    • Custom eVar 7
    • Custom eVar 8
  3. To enable these dimensions in your report suite:

    On Analytics Admin screen, click Report Suites.

    1. Select a report suite and then select Edit Settings > Conversion > Conversion Variables.

      conversion variables

    2. Click Add New and then select the Status checkbox. Select Enabled from the drop-down menu and then click Save.

      status enabled

    3. Add as many conversion variables as you need. It may take some time for them to appear on the Trigger dimensions screen.

In this solution, you can deploy the following script to handle Triggers I/O Events and to provide updates to the visitor profile in Customer Attributes via Target Profile APIs.

webhook.js

var request = require('request');
 
function main(args) {
 
  var method = args.__ow_method;
 
  if (method == "get") {
    var res = args.__ow_query.split("challenge=");
    var challenge = res[1];
    if (challenge)
    console.log("got challenge: " + challenge);
    else
    console.log("no challenge");
 
    return {
      body: challenge
    }
  }
 
    if (method == "post") {
      try{
        var body = new Buffer(args.__ow_body, 'base64');
        console.log("Message Body:"+body);
        var jSon = JSON.parse(body);
        var mcId = jSon.event["com.adobe.mcloud.pipeline.pipelineMessage"]["com.adobe.mcloud.protocol.trigger"].mcId;
        var index = jSon.event["com.adobe.mcloud.pipeline.pipelineMessage"]["com.adobe.mcloud.protocol.trigger"].enrichments.analyticsHitSummary.dimensions.eVar5.data.length - 1;
        var trPrices = jSon.event["com.adobe.mcloud.pipeline.pipelineMessage"]["com.adobe.mcloud.protocol.trigger"].enrichments.analyticsHitSummary.dimensions.eVar4.data[index];
        var trProducts = jSon.event["com.adobe.mcloud.pipeline.pipelineMessage"]["com.adobe.mcloud.protocol.trigger"].enrichments.analyticsHitSummary.dimensions.eVar5.data[index];
        var dcs_region = jSon.event["com.adobe.mcloud.pipeline.pipelineMessage"]["com.adobe.mcloud.protocol.trigger"].enrichments.analyticsHitSummary.dimensions.eVar8.data[index];
 
 
        var url = 'http://adobeiosolutionsdemo.demdex.net/event?trProducts='+trProducts+'&trPrices='+trPrices+'&d_mid='+mcId+'&d_orgid=C74F69D7594880280A495D09@AdobeOrg&d_rtbd=json&d_jsonv=1&dcs_region='+dcs_region;
        console.log("Calling AAM API with:"+url);
        return new Promise(function(resolve, reject) {
            request.get(url, function(error, response, body) {
                if (error) {
                    reject(error);
                }
                else {
                    resolve({body: response});
                }
            });
        });
      }catch(e){
        console.log("Error occured while calling the API",e);
      }
 
    }
 
}

To deploy the webhook.js and create a web action, enter the following commands:

wsk action create aam webhook.js
wsk action update aam --web raw

After entering the commands, the web action is accessible at the following location:

https://runtime-preview.adobe.io/api/v1/web/<your_openwhisk_namespace>/default/aam

To set up Adobe I/O Events:

  1. After signing in to the Adobe I/O Console, click New Integration.

    new integration button

  2. Select Receive real-time events and click Continue.

    real time events

  3. Select Analytics Triggers as an event provider and click Continue.

    create io trigger

  4. Click Continue to move on to the next page without making any changes.

  5. Provide the Name and Description for your integration.

    name integration box

  6. Generate a public certificate. To do this:

    1. Open a terminal and execute the following command:

      openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out certificate_pub.crt
      
    2. Upload the public certificate by clicking the Select a File link and then by selecting the certificate from your computer:

      public certificate

  7. On the Webhook Details form, add details, including your web action URL for I/O Events integration webhook. This is where Triggers messages will be delivered by I/O Events. Click Save.

    webhook details

    For more information on creating and registering webhooks, see Introduction to Webhooks.

Adobe Audience Manager is a data management platform (DMP) that helps you build unique audience profiles so you can identify your most valuable segments and use them across any digital channel.

To set up Audience Manager:

  1. In Audience Manager, click Manage Data.

    manage data

  2. Click Traits.

    traits

  3. Create a new Trait with the Expression Builder, as shown:

    expression builder

    expression built

  4. Click Segments and create a new Segment as shown below. Make sure you choose the correct report suite. Select the trait that you created in the previous step.

    trigger segment

  5. Click Destinations and create a new destination as shown below.

    destinations

  6. Choose the Browser platform.

  7. Add the segment created in the previous step in segment mapping.

  8. Save the changes.

To set up Target:

  1. Click Launch on the Target product card.

    target card launch

  2. On the Activities tab, click Create Activity and select Experience Targeting.

    create activity

  3. On the Create Experience Targeting Activity form, provide the target page URL.

    targeting activity

  4. On the Create Experience Targeting Activity form, provide the Target page URL.

    targeting activity

  5. Open the text editor to add a custom UI element for the user on the site. To do this, select an empty container and click Edit Text/HTML.

    container

  6. On the text editor, click the HTML button, paste the following HTML and click Save.

    best coat and jackets for you

  7. Click Next and then click Change Audience.

    change audience

  8. On the Choose Audience screen, select the Trigger-segment audience by aam-integration-user. This is the same segment that we created in Adobe Audience Manager.

Note: If this segment doesn't appear in your target then please make sure that "Shared Audiences" is [enabled for your organization] (https://adobe.allegiancetech.com/cgi-bin/qwebcorporate.dll?idx=X8SVES).

trigger segment audience

  1. On the Activity Setting, update your Goal Metrics.

    activity settings

  2. Click Save & Close.

To watch the solution work, you can test the cart abandonment scenario:

  1. At http://localhost:4502/content/we-retail/us/en/products/men.html, click on a product you want to test.

  2. Select a Color and Size, then click the ADD TO CART button and Checkout.

  3. Enter details on the ORDER form and then click CONTINUE.

    checkout form

  4. Close the browser tab to simulate the cart abandonment scenario.

  5. On the Triggers UI page, watch for your specified trigger event to appear.

    triggers page

  6. On the Command Line Interface (CLI) enter the following commands:

    wsk activation list runtime
    

    runtime commands

  7. Select and copy the first activation listed and paste it into the following command:

    wsk activation get f6f5ae1dcb3d4292991d63f22283fb94
    
  8. View the Products site page to see the custom UI element you created.

    best coat message in ui

Author

Feedback?

Please help make this solution as useful as possible. If you find a problem in the documentation or have a suggestion, click the Issues tab on this GiHhub repository and then click the New issue button. Provide a title and description for your comment and then click the Submit new issue button.

submit new issue

About

Integrate Adobe Audience Manager with Adobe I/O for Cross-Platform Targeting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published