AEM has an opt-in procedure to help you integrate with Adobe Analytics and Adobe Target. This is available out-of-the-box, as a pre-loaded task assigned to the administrator user group.
When you log in as an administrator this task (Configuring Analytics & Targeting) is available from the Inbox. Based on the credentials you supply, it helps you configure and integrate these services.
You have the following options for configuring the integration:
Configure the integration via the task.
This can be done either immediately or later, the task will remain in the Inbox until some action is taken. In either case the configuration can be done directly in the UI, or with the use of a pre-defined
Opt out of the integration.
Consider this option if you prefer to manually configure the integration. See also Integrating AEM with Adobe Target and Adobe Analytics using DTM.
Configure the set up and provisioning by using a script.
Opt into the integration with:
For either option you need to provide the user account information and specify the pages that are tracked.
You can optionally provide Analytics and Target account information using a properties file that is read upon server startup. See Providing Account Information Using a Properties File.
When you opt into the integration, AEM performs the following tasks:
AT.js is the default client library. This is configured under your target cloud services configuration.
Adobe recommends that you use AT.js as the client library.
To opt-in from the pre-loaded, out-of-the-box task:
From your Inbox, select and Open the Configure Analytics & Targeting task.
Select the sites for which Analytics and/or Target should be used.
Select Done to complete.
After you opt into the configuration, you need to publish the affected site/pages to replicate these changes to your publish instance.
Opt out of the integration with Analytics and Target when you either:
Do not want to integrate with these products.
Prefer to configure the integrations manually.
To opt out you need to complete the pre-loaded task:
Install a properties file that AEM reads on server startup to configure the account properties for the integration with Analytics and Target. When you use the properties file, the opt-in wizard automatically uses the properties from the file and the cloud configuration is created accordingly.
The properties file is a text file named marketingcloud.properties that you save in the working directory that the AEM process is using (typically the same directory as the JAR file). The file includes the following properties:
Properties and values are separated with equal signs (=). The Analytics properties are prefixed with
analytics, and the Target properties are prefixed with
target. To configure a service, provide values for all of the properties for that service. If you do not want to configure a service, provide no values for that service.
The following example
.properties file includes the property values for creating a cloud configuration for Analytics:
analytics.server=https://test.omniture.com/login/ analytics.company=MyCompany analytics.username=sbroders analytics.secret=12345678 analytics.reportsuite=myreportsuite target.clientcode= target.email= target.password=
The following procedure describes how to opt into the integration using the properties file.
marketingcloud.properties file in the working directory that the AEM process is using (author instance).
The working directory is usually the directory that holds the jar or
However, it can also be defined as an absolute path by the system property:
Add the property values according to your Analytics and/or Target accounts.
Start or restart the server, and then log in using an administrator account.
Open the Configure Analytics & Targeting task as described in Configuring the Integration. Instead of requesting your account information, the wizard uses the values from the
Select Add for the appropriate service, then continue with the wizard.
When you configure the integration with Analytics and Target, AEM automatically creates the required cloud configurations and frameworks. For example, the Analytics cloud configuration is called Provisioned Analytics Account.
You do not need to alter the cloud configurations. However, you can configure the frameworks as needed. (See Mapping Component Data with Adobe Analytics Properties and Add a Target Framework.)
By default when you opt into the Adobe Target configuration wizard, Accurate Targeting is enabled.
Accurate targeting means that the cloud service configuration waits for the context to load before loading content. As a result, in terms of performance, accurate targeting may create a few millisecond delay before loading content.
Accurate targeting is always enabled on the author instance. However, on the publish instance you can opt to turn accurate targeting off globally by clearing the check mark next to Accurate Targeting in the cloud service configuration (http://localhost:4502/etc/cloudservices.html). You can also still turn accurate targeting on and off for individual components regardless of your setting in the cloud service configuration.
If you have already created targeted components and you change this setting, your changes do not affect those components. You must make any changes to those component directly.
When you opt into the Analytics configuration and a specific
reportsuite is selected, then the framework is restricted to the publish run mode. This means that tracking only works on the publish instance.
If tracking is needed on an authoring instance as well the value should be changed to
As an administrator, you may want to trigger setup and provisioning with a script rather than manually stepping through the wizard. You can do so by:
Which parameters you send depends on the following:
If you want to use the marketingcloud.properties file filled in with all the required credentials, then you must send the following parameters:
path=path to an AEM page to attach the created cloud services configs
For example, a curl request that creates both Analytics and Target configurations and attachs them to the we.retail page would be:
curl -v -u admin:admin -X POST -d"automaticProvisioning=true&servicename=target&servicename=analytics&path=/content/we-retail" http://localhost:4502/libs/cq/cloudservicesprovisioning/content/autoprovisioning.json
If you do not want to use the marketingcloud.properties file then you will have to send the credentials as well as parameters; for example:
Name of company
In this case, the curl request that creates both Analytics and Target configurations and attachs them to the we-retail page would be:
curl -v -u admin:admin -X POST -d"automaticProvisioning=false&servicename=target&servicename=analytics&path=/content/we-retail&analytics.server=https://servername/&analytics.company=Name of email@example.com&target.password=password" http://localhost:4502/libs/cq/cloudservicesprovisioning/content/autoprovisioning.json