Adobe Target implementation via Target API

Adobe Target implementation via Target API

Westpac is using adobe target for last few years. We have done few implementation some via the JS in public website, mobile apps placement via the Adobe SDK. But target footprint is limited to non-secure placements. We are not allowed to go near any secure spaces(banking) as the nature of the target application and how it works.

We want to introduce the same personalization capability that exist in public space into secure spaces. Provide similar experience across all platforms. This year we introduce personalization capability via the target API. In this post I am going to talk about the background why we take this approach.

We introduce CassPer(Content As service for Personalization) a custom API end point to handle all target request and return responses based on destination platforms. Example web can ingest html/css but for mobile apps we use JSON. We also don’t want to setup all the variation of a single campaign in target. We want to use AEM capability to separate the content from target.

In our web or app we are going to hit CassPer API with AMCV, mBox, trackingid. CassPre api layer will generate the server state with supplied AMCV (which includes SDID). Now we are ready for the Target API call. Target will return will resolve to a campaign for this placement. For us target will return the CEM path(AEM content/fragment path) with campaign parameters.

Taregt campaign setup


Target response to CassPer API

    "marketingCloudVisitorId": "59770152642756708692258765215479868738",
    "clientSideAnalyticsLoggingPayload": {
        "parameters": {
            "pe": "tnt"
        "a4t": false
    "edgeHost": "",
    "content": "{
            "campaign-recipe-name":"Experience A"
    "sessionId": "1554254677196"

In AEM content fragment is loded from the path; in this point we modify cta with additional parameters. In the CTA we use ttid (target parameter) which is campaign name and campaign experience.

CassPer API will combined everything and send the data to the page. When content is render to the page we have to do few thing. Use A4T to inform target what campaign is shown to customers. We analytics implementation where we record campaign impressions (some time part of the page analytics call or lazy load scenario we send additional calls to analytics)

Sample CassPer API response

<div class="cem-aem" data-mod-dl="PERS155669442607640"
    data-ttid-dl="target-campaign-name>Experience A">
<!-- With placeholders -->
<p>You have...</p>
<a href="testPage?ttid=target-campaign-name>Experience A">


Let’s talk about the analytics call

  • For web campaign is displayed within the pages
    • Reset visitor server state
    • Send campaign parameters (ttid value to evars)
    • Make sure sdid is also passed part of the analytics call
  • For web campaign is lazy loadafter page load
    • Reset visitor server state
    • Send campaign parameters (ttid value to evars) via interaction call
    • Make sure sdid is also passed part of the analytics call
  • Mobile apps always lazy loaded
    • Send interaction calls to analytics
    • Send campaign parameters (ttid value to context variable)
    • Make sure tnta values are passed part of the analytics call

How to make sure if everything working as expected

  • We have done validation on both side from target side and analytics side
  • From target: check the analytics for target is working by looking in to campaign parameters are populated
  • From Analytics side: check for target campaign (evars) to make sure we are getting impression and clickthrough

What we discover throughout the process

Mobile Apps:

Mobile apps SDK does not expose some of the values what we need for target calls. Example MCMID, AAMLocationHint and AAMBlob. As a result we have to collect those values from application context manually. Also SDK does not provide a way to pass the tnta values to analytics call. So we have to manually inject that to analytics call.

Web A4t:

Node module help a lot to create SDID and AAM values from serverside as a result we reset server state in the client browser.

This project is maintained by shafiiub