OSGi Configuration for the AEM Instance

Before using the integration you must configure the Audience Manager Client with the Audience Manager Client ID and Client Secret mentioned above. Without this all requests to the Audience Manager service will be denied.

Click on the component named Adobe CQ Audience Manager REST Client Service which should be near the top of the list. You will see the configuration dialog below.

Enter the value you have been given for Client ID in the field labelled Audience Manager Client ID.

Enter the value you have been given for Client Secret in the field labelled Audience Manager Client Secret.

Click Save.

That completes the OSGi Configuration for the AEM Instance. You will not have to do this again for the instance unless the Client ID or the Client Secret change.

Adobe Audience Manager Cloud Service Configuration

Once the AEM instance has been configured with an Audience Manager Client ID and Client Secret you are ready to configure a connection between the AEM instance and the Audience Manager service you have been given details for. There may be many instances of Audience Manager connected to a single AEM instance, and vice versa. If you need to connect more than one you will have to make some configuration changes (see below) to select which instance is being used on which site. By default AEM is configured to connect to the Audience Manager Cloud Service configuration named "test." To configure that, follow these steps:

When the test page is created, a dialog appears with three blank fields, which are all required. The field Token Expire Date is generated for you and you do not have to enter a value.

Enter the value given to you for the Audience Manager partner into the Partner field. Enter the value given to you for the Audience Manager container ID into the Container Namespace ID field.

Click Connect to AudienceManager.

The values for Partner and Container Namespace ID are validated with the Audience Manager Service. If they are valid, a username and password prompt displays to authorize the AEM server to communicate with the Audience Manager service on your behalf. The AEM server does not store your username and password, but will use them to authenticate and retrieve access tokens.

Enter your Audience Manager user name in the Username field and password in the Password field and click OK.

The configuration screen completes the configuration on your behalf and retrieve access tokens to enable the AEM instance to configure the Audience Manager service for AEM use. After the tokens are retrieved you are taken back to the AudienceManager Setting dialog where the OK button is enabled, and the Token Expire Date field is filled in.

The Connect to AudienceManager button has been replaced by a Re-Connect to AudienceManager button. If you need to re-authenticate this configuration in the future you may come back here and click Re-Connect to AudienceManager to re-authenticate and connect.

Once the configuration settings are saved you see the AudienceManager Setting screen updated with your values.

In the background, the AEM server is communicating with the Audience Manager service. It is configuring segmentation rules for all Audience Manager Segments associated with your account and is setting up a URL Cookie destination in the Audience Manager service. When this process completes, you see a log message as follows in the error log. The process takes about 30 seconds for each 100 Audience Manager Segment encountered.

This completes the configuration of the Cloud Service for Audience Manager. You may now configure the Client Context to enable you to manipulate AEM segmentation using Audience Manager traits.

Publish Instances

The Audience Manager integration comes with client side javascript for published pages. It uses the information entered in the configuration to retrieve the Audience Manager Segments for the user viewing the page on page load. There is no requirement to have any special Audience Manager libraries to make this work.

In addition to automated load of user segments deployers may trigger events and traits back to the Audience Manager instance using the Javascript method:

CQ_Analytics.AAM.AudienceManager.invoke(mapOfSignals)
where mapOfSignals is a map containing
sid : [ array of Audience Manager Triat IDS ]
any other property: a custom signal to the Audience Manager Service

If you have more than one Audience Manager URL or Cookie Destination you want to incorporate you may adjust the configuration in the init.js.jsp files to add those destinations in. See Using Client Libraries for more details.

Changing the Selected Cloud Service Configuration

To change which Cloud Service configuration is selected, change the inherited page property audienceManagerConfig on the page in question to the name of the configuration. It defaults to test.