This technical implementation guide provides information about the reference architecture, ​guidelines, configuration steps and tests that implementation specialists need to follow while integrating Adobe Experience Manager (AEM) with Adobe Target.

This technical integration guide is intended for Adobe Consultants, Adobe Partners, and other experienced implementation specialists. Configuring this integration requires a full understanding of the implementation process for each individual solution covered in this guide.

Adobe customers can contact Adobe Professional Services or an Adobe Partner to learn more about this integration.

Integration Options

The below are integration options on the Publish servers, the only recommended way to handle Author instances is through the integration as it enables all the features for authors.

Option 1: AEM-Target direct Integration

Integrating AEM directly to Target using the cloud services configurations within AEM. All the Audiences will be configured and are done in Target. Within AEM authors can then create various activities using audiences synced from Target.

The main objective of this integration would be to enable authors to do personalisation from within AEM.

  • If using AEM 6.1, A/B testing can be enabled by Installing latest Feature pack 'Target enhancement' for AEM 6.1
    • Feature Pack: 6985
  • Carrying out A/B Testing from within AEM console is part of AEM 6.2.

Option 2: Target Standalone

Target must be configured to “look” for a specific URLs for targeting. No integration is required.

Option 3: AEM-Target integration via Tag-Management system (Recommended)

AEM (Publish)-taregt best integrations is via tag-management system, ideally by DTM.

Follow the steps as listed in ppt to integrate the AEM via DTM. This is the preferred integration from Adobe perspective. 

If considering this integration, Optimisation team will have access to Visual Experience Composer for easy targeting.


Solution Planning And Integration Architecture

For carrying out AEM & Target Integration , the following pre-requisites must be met :-

  • An Installation of AEM Author & Publish instance provisioned either on Cloud ( AMS ) or on premise. AEM License must be procured for such a setup.
  • The Customer needs to be provisioned a valid Adobe Target Account ( Standard or Premium based on the requirement ).The account must have a approver level permission.When you register with Adobe Target, the customer will receive a client code. The client code and the Adobe Target login name and password is required to connect AEM to Adobe Target.
  • If DTM is planned to be used for the integration, the customer needs to be provisioned access to the Activation Core Service.


Refer to adobe docs link for more details on the pre-requisites :

Implementation Architecture

AEM & Target System Setup


AEM & Target Reference Architecture - Publish Website


Installation, Provisioning and Configuration

Set-up/ Provisioning

Implementation Delivery

​Solution Implementation

This section details out the solution implementation for AEM & Target direct integration ( without using DTM- Option 1 from Section 3 ).

The following publicly available documents from Adobe will be helpful in setting up the integration between AEM & Target :-

How it works

To perform content targeting from AEM you need to :

  • Configure a Cloud Services configuration
    • Tools -> operations -> Cloud -> Cloud Services
    • Go to Adobe Target and create a new configuration, you will need
      • Target Classic username
      • Target Classic password
      • Client Code
        Customers should open a Client Care ticket to have the Target Classic username/password created for use with this integration.  The Target Classic UI is being sunset in Fall 2017 and many customers do not have existing logins to this UI.

if you do so the following js will be saved beneath your cloud services configuration and the following will be added to your webpage

<script type="text/javascript" src="/etc/cloudservices/testandtarget/adobecq5/_jcr_content/public/mbox.js"></script>

The above configuration contains the following options:

  • Synchronize segments from Adobe Target: this option will allow a user to map Experience names defined in AEM to segments created in Adobe Target in order to reuse the full segmentation capabilities provided by Target
  • Use mbox.js delivered by DTM: this will only work if you configured a DTM account. Otherwise, mbox.js will not be loaded.
  • Custom mbox.js allows you to add your custom mbox.js script. If no mbox.js is defined, the out-of-the-box version shipped with AEM will be used. Note the version used in AEM 6.1 doesn't seem 100% up to date, as a result I would recommend:
    • Use mbox.js delivered by DTM
    • or use the mbox.js provided in your Adobe Target account

Once this is done you need to add the cloud service configuration to your website (page properties -> cloud services -> add service). This will enable the targeting option in the AEM touch UI:


Once you click Start Targeting, the TouchUI will enter in Target mode:

Click on a component or Parsys to enable content targeting:


Then make sure to click on the Configure button to name the location, otherwise a default Location name based on the page path will be generated in Target:


What happens behind the scenes is that as soon as you click on Target component, AEM adds an mbox wrapper around your component definition.

You can now start doing personalization by:

  • Selecting a Brand
  • Selecting an Activity

Then select a Segment to start creating an offer. 

Note that the wording differs between AEM and Target. For instance the Activity that you select will in fact generate two campaigns (A/B testing) in Adobe Target. For instance, in the exemple below I've used Geometrixx-Outdoors and Cosy up Winter:


I then select the Experience (aka segment) to customize the webpage:


You can either create an inline offer or re-use an offer from the Offer library. An inline offer is just available in this page and cannot be re-used in other places of your website. If you select a default or inline offer it will be stored directly beneath your component node in CRX.

In the exemple above I've re-used an Offer from the Offer Libary. The offers are defined in /content/campaigns.


Click next to assign AEM segments to Target Segments.


Click next Again to configure your Campaign:


As a result AEM performs a several calls to the Target API to

  • Create a new Location
  • Create an Campaign based on the Activity selected
  • Create the associated Offers

What happens in Adobe Target

Wait a few minutes and login again to Target to see what has been generated:

go in Adobe Target -> Campaigns -> List

You should now see your campaign created:


If you Edit the campaign you should see all the offers and locations automatically mapped:


AEM created:

  • Campaigns
  • Offers
  • Locations

Notice also that the name of each Experience matches the name of the Segments defined in AEM.


The location generated is suffixed by --author so that data from author tests doesn't get mixed up with live campaigns running on publish instances. the Offer name is generated based on the location name + title of the offer in the AEM offer library.

Now let's have a look at the offer itself which is quite different from what you can get if a regular target implementation. An AEM generated offer looks like this:



It may take several minute up to a couple hour to see your new Location displayed in Adobe Target. In previous versions of AEM you had to go to a Publish instance in order to trigger the creation process of the mbox within Target, alternativerly you can simulate this by using the wcmmode=disabled query parameter in the page

The offer here contain a script tag that then pulls content back in AEM using AJAX. therefore the overall workflow is less optimized than a manual Target implementation since the Client->server calls works like this:


End result on a browser

Here is the actual Client/Browser -> AEM ->Target workflow:

  1. A user request a page
    1. AEM or the CDN / Dispatcher returns the page
  2. The page contains an Mbox, therefore a call to Target is made
    1. Target returns the customized offer or the default offer to the browser
  3. The browser then interprets the script block return (because of the offer generated by AEM) and performs a call to AEM (content can is cached in Apache or CDN) to retrieve the content to the offer
    1. The CQ_Analytics API integrates the response within the body of the web page

With a regular HTML -> target integration step 3 is not here because target returns directly the correct HTML code therfore the manual integration can be seen as faster and more optimized. The side effect of the AEM integration is that you might see a small delay or flickering to see your customized content. Things get a bit slower if you add on top of that custom mbox parameters that comes for the context Hub (formerly client Context) because AEM needs to wait for the context hub to be loaded before performing a call to the Adobe Target Mbox.


To troubleshoot the calls from the browser to Target refer to the documentation: To enable debug you will need to go to your Target Classic Admin UI and generate a token (valid 6 hours)

  • Go to target classic
  • Configuration -> mbox.js -> Edit
  • Scroll at the bottom of the page and select Generate Authentication Token

Deployment Strategy

AEM can be deployed in Authoring Mode or Publishing Mode. There are various deployment options available for AEM in both Author / Publish Mode.

Please refer to the below link which details out the criteria to decide on the deployment option based on customer requirement :-