Home Services Blog → AEM → Adobe Target → Adobe Analytics About Contact
AEM

Integrate Adobe Target with AEM: Complete Setup Guide

Want to personalize your AEM site? Adobe Target integration lets you run A/B tests, target content to segments, and optimize experiences. This guide walks you through the setup step by step.

Adobe Target and AEM Integration

Why Integrate Target with AEM?

Adobe Target and AEM work great together. AEM handles your content. Target handles personalization. When connected, you can:

  • Run A/B tests on AEM pages without developer help
  • Personalize content based on visitor behavior, location, or segments
  • Export Experience Fragments from AEM to use as Target offers
  • Use the Visual Experience Composer to edit AEM pages in Target
  • Track results with Analytics for Target (A4T) reporting

Integration Methods

How you connect depends on your AEM version:

AEM Version Method Authentication
AEM Cloud Service Adobe IMS (required) Adobe Developer Console
AEM 6.5 Adobe IMS (recommended) Adobe Developer Console
AEM 6.5 Legacy Cloud Config Client Code + API Token
AEM 6.4 and older Legacy Cloud Config Client Code + API Token
Recommendation

Use Adobe IMS whenever possible. It's more secure and required for Cloud Service. Legacy authentication still works but Adobe may deprecate it.

Prerequisites

Before you start, make sure you have:

  • Admin access to AEM (author instance)
  • Admin access to Adobe Target
  • Access to Adobe Admin Console (for IMS setup)
  • Your Target tenant code (found in Target UI under Setup > Implementation)
  • Your IMS Organization ID

Step-by-Step: IMS Integration (AEM Cloud Service & 6.5)

1 Create Adobe I/O Project

Go to Adobe Developer Console and create a new project:

  1. Click "Create new project"
  2. Add API → Select "Adobe Target"
  3. Choose "Service Account (JWT)" or "OAuth Server-to-Server"
  4. Generate or upload a certificate (for JWT)
  5. Save your credentials

2 Configure IMS in AEM

In AEM, go to Tools → Security → Adobe IMS Configurations:

  1. Click "Create"
  2. Select "Adobe Target" as the cloud solution
  3. Enter your IMS Organization ID
  4. Paste the API Key (Client ID) from Developer Console
  5. Paste the Client Secret
  6. Add your certificate (for JWT auth)
  7. Click "Create"

3 Create Target Cloud Configuration

Go to Tools → Cloud Services → Adobe Target:

  1. Click "Create" and choose a configuration folder
  2. Enter a title (e.g., "Adobe Target Production")
  3. Select the IMS configuration you just created
  4. Enter your Target tenant code (e.g., "mycompany")
  5. Select your Target client code
  6. Click "Connect to Target" to verify
  7. Save the configuration

4 Apply to Your Site

Link the configuration to your site:

  1. Go to Sites console
  2. Select your site root
  3. Click Properties → Cloud Services
  4. Add the Adobe Target configuration
  5. Save and close

Using Experience Fragments with Target

Experience Fragments (XF) are a powerful way to manage Target offers in AEM. You create content in AEM, export it to Target, and use it in activities.

Export an Experience Fragment

  1. Open the Experience Fragment editor
  2. Create or edit your fragment variation
  3. Click the Export to Target action in the toolbar
  4. Select your Target configuration
  5. Choose "Export as HTML" or "Export as JSON"
  6. Click Export

The fragment appears in Target under Offers → Code Offers.

Pro Tip

Name your XF variations clearly (e.g., "Homepage Hero - Promo A"). This makes them easy to find in Target when building activities.

Experience Fragment Offer Structure

// Target offer created from XF export
{
  "name": "homepage-hero-promo-a",
  "type": "html",
  "content": "<div class='hero'>...</div>",
  "modifiedAt": "2025-01-15T10:30:00Z",
  "workspace": "default"
}

Visual Experience Composer with AEM

The Visual Experience Composer (VEC) lets you edit pages visually in Target. To use it with AEM, you need to configure CORS and possibly your dispatcher.

Enable VEC Access

Add these headers to your AEM dispatcher or CDN:

# Dispatcher config for VEC
<IfModule mod_headers.c>
  # Allow Target VEC to frame your pages
  Header always set X-Frame-Options "ALLOW-FROM https://experience.adobe.com"
  
  # Or use Content-Security-Policy
  Header always set Content-Security-Policy "frame-ancestors 'self' https://experience.adobe.com"
  
  # CORS for Target API calls
  Header always set Access-Control-Allow-Origin "https://experience.adobe.com"
  Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS"
  Header always set Access-Control-Allow-Headers "Content-Type, Authorization"
</IfModule>
VEC Troubleshooting

If VEC can't load your page, try the Enhanced Experience Composer (proxy mode) or install the VEC Helper browser extension. These bypass most CORS issues.

Analytics for Target (A4T)

A4T lets you use Adobe Analytics as the reporting source for Target activities. This gives you richer data and avoids duplicate tracking.

Enable A4T

  1. Ensure Analytics and Target share the same IMS org
  2. In Target, go to Administration → Reporting
  3. Select "Adobe Analytics" as default reporting source
  4. Choose your Analytics report suite
  5. In AEM, make sure both Analytics and Target cloud configs are applied to your site

A4T Data Flow

With A4T enabled:

  • Target activity impressions go to Analytics
  • Success metrics are measured in Analytics
  • Reports appear in both Target and Analytics Workspace
  • You can segment Target data by any Analytics dimension

Common Integration Patterns

Pattern 1: XF-Based Personalization

Best for: Content-heavy sites managed by marketers

  1. Create Experience Fragment variations in AEM
  2. Export variations to Target
  3. Build Target activity using XF offers
  4. Target decides which variation to show

Pattern 2: VEC-Based Testing

Best for: Quick A/B tests without AEM changes

  1. Open VEC in Target
  2. Load your AEM page URL
  3. Make visual edits (text, images, layout)
  4. Set up audience targeting
  5. Launch the activity

Pattern 3: Form-Based Activities

Best for: Single-page apps, headless AEM

  1. Create mbox locations in your code
  2. Build activity using Form-Based Composer
  3. Return JSON offers from Target
  4. Render content client-side

Troubleshooting

Issue Solution
IMS connection fails Check certificate expiration, verify API credentials, ensure correct IMS org
XF export fails Verify Target cloud config, check user permissions, review error logs
VEC won't load page Check CORS headers, try Enhanced EEC, use VEC Helper extension
Activity not showing Verify at.js is loaded, check activity status, clear browser cache
A4T data missing Ensure Analytics tracking fires, verify SDID stitching, check report suite

Best Practices

  1. Use IMS auth — It's more secure and future-proof than legacy tokens.
  2. Organize XFs clearly — Create folders by campaign or page type.
  3. Enable A4T — Unified reporting saves time and gives better insights.
  4. Test in lower environments — Always verify on stage before production.
  5. Document your setup — Record tenant codes, configs, and permissions.

Conclusion

Integrating Adobe Target with AEM unlocks powerful personalization. Start with the IMS setup, test Experience Fragment exports, and explore the Visual Experience Composer. Once connected, your content team can run tests without developer help.

The key is getting the foundation right. A proper IMS configuration and clear XF naming conventions make everything else easier.

Related Topics

Adobe Target AEM Integration Experience Fragments Visual Experience Composer A4T Adobe IMS AEM Cloud Service Personalization A/B Testing WegWorks Adobe Experience Cloud

Need Help with Target + AEM Integration?

Our team at WegWorks has set up Target integrations for many AEM sites. We can help you get it right the first time.

Get Expert Help