Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideProduct feedbackGitHubNuGetDev CommunitySubmit a ticketLog In

Integrate Adobe Audience Manager

Enable the Adobe Audience Manager integration in Optimizely Web Experimentation to create new audiences.

You can integrate Adobe Audience Manager (AAM) to use your target segments with Optimizely Web Experimentation audiences for targeted experiments and personalized campaigns.

You must have the following for this integration:

  • A valid Adobe Audience Manager subscription.
  • Administrative permissions in Adobe Audience Manager.

Set up Adobe Audience Manager

Step 1: Configure an Optimizely Web Experimentation destination

AAM destinations let you share segments with integration partners like Optimizely Web Experimentation.

  1. Go to Audience Data > Destinations > Create New Destination.

    📘

    Note

    Unless otherwise indicated, you must configure the settings as written to ensure the integration works correctly. All settings are required.

  2. Enter the Basic Information:

    • Name – Enter your destination name.
    • Description – Enter a description for your destination.
    • Category – Choose Custom.
    • Environment – Select Browser.
    • Type – Select Cookie.
    • Auto-fill Destination Mapping – Select Yes and Segment ID.
  3. Click Next.

  4. Enter the following Configurations:

    • Cookie Name – Enter aamoptsegs.
    • Cookie Domain – Enter the domain where you want to create the AAM cookie. For example, if you want to target experiences on all subdomains of example.com, enter example.com.
    • Max Size – Enter your desired maximum size for the cookie.
    • Expire after – Enter your desired number of days for the cookie's expiration.
    • Publish data to – Select the option you prefer.
    • Data Format – Select Single Key.
    • Key – Enter aam.
    • Key-Value Pair Delimiter – Enter , (a comma).
    • Serialize – Deselect the Enabled selection checkbox.
  5. Click Save.

Step 2: Map segments to the Optimizely Web Experimentation destination

After you create your destination, you can map one or more AAM segments to use with Optimizely Web Experimentation.

  1. Click Segment Mappings.
  2. Select one or more AAM segments.
  3. Click Add Selected Segments.
  4. Select the Optimizely Web Experimentation destination.
  5. Click Save.

To view all segments mapped to a destination, go to Audience Data > Destinations and select your Optimizely Web Experimentation destination. To confirm that your segments are properly mapped, ensure that the Mapping column contains values like aam=2473389 (where 2473389 is the Segment ID).

Step 3: Generate API credentials with access to the Optimizely Web Experimentation destination

The API credentials (Client ID and Secret Key) enable Optimizely Web Experimentation to retrieve AAM segments and make them available in the audience builder. To obtain the credentials, contact the Adobe Client Team at [email protected].

Step 4: Map destinations to the Optimizely Web Experimentation credentials

You must map/expose your new destination IDs to the Optimizely Web Experimentation credentials you generated in mapping segments. The destinations you see when you use your federated Adobe ID to log in to AAM may not all be mapped to the Optimizely Web Experimentation credentials. If you do not have administrative privileges in AAM, you must request assistance from an AAM admin on your team or from your Adobe representative to execute this mapping.

After you receive confirmation:

  1. Verify that your destination is mapped by logging in directly to AAM. Log out of your federated Adobe ID account, and go to Adobe Audience Manager login. Ensure that the login screen prompts you for an Adobe Audience Manager username and password. You should not be prompted to use your Adobe ID.
  2. Enter the username and password you or your admin generated in the mapping segments step.
  3. Go to Audience DataDestinations to view the destination IDs that are mapped to the Optimizely Web Experimentation credentials. You can now log out of AAM and reuse your federated Adobe ID to log back into the Adobe suite.

Optimizely Web Experimentation setup

After configuring AAM, complete the integration setup process through the Optimizely Web Experimentation interface. 

  1. Log in to Optimizely Web Experimentation and go to Integrations.

  2. Select Adobe Audience Manager and toggle the setting to On.

  3. Enter your AAM Client ID and Secret Key (obtained from Adobe Customer Care).

  4. Enter an AAM User Name and Password. This is different from an Adobe ID (which is typically an email address).  Even if you access the AAM interface via an Adobe ID, an AAM administrator should be able to generate a dedicated AAM User Name and Password, which is required for this integration. Optimizely Web Experimentation uses your AAM Client ID and Secret Key combined with your User Name and Password to access the AAM API and retrieve a list of mapped segments.

    📘

    Note

    You should create a service account to use instead of your personal account. This reduces the chance of breaking the integration if you reset your personal account password.

  5. Enter your Destination ID (the ID of the AAM destination you created to use with Optimizely Web Experimentation). To find your Destination ID, go to Manage Data > Destinations in the AAM interface. Use the new destination ID created for your product group to integrate with Optimizely Web Experimentation, and ensure it is mapped to the AAM User Name and Client ID defined above. You may need to request assistance from Adobe for this step.

  6. Click Save.

If Optimizely Web Experimentation displays "internal server error" when attempting to save your integration settings, it generally means that your credentials could not be validated. Re-enter your credentials and try again. If you continue to see an error, submit a support ticket via the in-product request form.

If Optimizely Web Experimentation displays "Your Account ID appears to be invalid." when attempting to save your integration settings, it means your destination ID is not mapped to the credentials. See Map destinations to the Optimizely Web Experimentation credentials.

Snippet placement

For best results, place the Optimizely Web Experimentation snippet immediately after the code used to deploy Adobe Audience Manager on the page, such as the standalone Data Integration Library (DIL) or Adobe Dynamic Tag Manager (DTM) header code, to ensure AAM segments are available when Optimizely activates. If AAM cannot generate the aamoptsegs cookie for a visitor prior to activation, the visitor qualifies for the Optimizely Web Experimentation audience the next time Optimizely Web Experimentation activates (typically on the next page load).

Example implementation of AAM deployed via DTM:

<head>
  <script src="//assets.adobedtm.com/ADOBE\_ID/satelliteLib-ADOBE\_ID.js"></script>
  <script src="https://cdn.optimizely.com/js/YOUR\_PROJECT\_ID.js"></script>
</head>
...

Use the integration to create an audience

Create Optimizely Web Experimentation Audiences using AAM segments as conditions. 

  1. Open the Audience Builder.
  2. Go to Overview > Audiences > New Audience.
  3. Enter a Name for the audience.
  4. Expand Adobe Audience Manager and drag the Segment condition to the left.
  5. Select the segment you want to target from the drop-down list.
  6. Click Save.

You can use the audience to target experiments and Personalization campaigns.

📘

Note

You can target custom segments within a single audience by combining the existing segments with and, or, and not. For example, “Segment A” and not “Segment B”.

To learn more about audiences in Optimizely Web Experimentation, see Audiences: Choose which visitors to include.

Target based on Adobe Analytics segments

This integration makes AAM segments available for targeting in Optimizely Web Experimentation, but you may want to target segments defined in Adobe Analytics. To do this, you need to share Adobe Analytics segments with Adobe Marketing Cloud, which also makes the segment available in AAM.

  1. Ensure that both Adobe Analytics and AAM use the Marketing Cloud ID Service.
  2. Select a segment in Adobe Analytics.
  3. Select the Make this a Marketing Cloud audience checkbox.
  4. Go to AAM and find the segment in the Analytics Segments folder under Manage Data > Segments.
  5. Map the segment to your Optimizely Web Experimentation destination.

📘

Note

Adobe Analytics segment data is pushed to AAM every 24 hours.

See also Share Segments with the Marketing Cloud on Pedro Monjo’s blog.

Integration data flow

Optimizely customer-provided data

When you enable the Adobe Audience Manager (AAM) integration for an Optimizely Experimentation project, you input the following authentication credentials, which Optimizely encrypts and retains:

  • AAM Client ID
  • AAM Secret Key
  • AAM Username
  • AAM Password

Additionally, you must provide an AAM Destination ID, which Optimizely stores in plaintext.

AAM data in the Optimizely application

When an Optimizely user accesses the Audience Builder, the integration decrypts the values collected in the previous step and makes an authenticated request to the AAM REST API to retrieve a list of targetable AAM segments.

Specifically, the Optimizely Web Experimentation application makes an authenticated request to the https://api.demdex.com/v1/destinations/*DESTINATION_ID*/mappings endpoint (populating *DESTINATION_ID* with the value you provided when enabling the integration). For each targetable segment, Optimizely receives the segment’s display name and numeric ID. The Optimizely Audience Builder then renders these segments to construct Optimizely Audiences.

When an Optimizely user constructs and saves an Optimizely Audience incorporating an AAM Segment condition, the definition of the audience contains the numeric ID of the AAM Segment condition. The Optimizely Application Datastore stores the Optimizely Audience definition and incorporates it into any Optimizely Web Clients (that is, “Optimizely X Snippet”) associated with the Optimizely project.

Any AAM segments returned by the AAM REST API but not used to build an Optimizely Audience are discarded. They may be retrieved subsequently when an Optimizely user accesses the Optimizely Audience Builder.

AAM Data on the customer’s website

When the customer's website receives the Optimizely web client and enables the AAM integration, the web client does the following on activation (typically immediately on page load):

  1. Check for the presence of a cookie named aamoptsegs.
  2. Parse the cookie to retrieve a list of AAM segments for which the current visitor qualifies.
  3. Match the identified segments against Optimizely audience conditions to determine a visitor’s eligibility for targeted Optimizely experiments.

📘

Note

The AAM web client retrieves the active visitor’s segment membership and sets that information in the cookie named aamoptsegs as described in step 1. The Optimizely web client does not generate a network request to AAM API endpoints.

For more information, see Optimizely Add-on Platform Terms of Service, which governs this integration).