September 18, 2020
Estimated Post Reading Time ~

Integrating AEM 6.5 with Adobe Target



Over a year ago, I wrote a guide for integrating Adobe Experience Manager (AEM) 6.4 with Adobe Target. Since then, with the release of AEM 6.5, a few things have changed. I see this article as an update of the previous guide we released, so here I’ll only highlight some key differences and issues I ran into when implementing with AEM 6.5. All the same prerequisites in 6.4 still apply in 6.5, so make sure to check out the first guide before getting started, if you haven’t yet.

Adobe IMS Configuration for Target
The primary change in configuring the integration is how AEM authenticates with the Target API. The new recommended approach for this is using Adobe IMS (Identity Management System) instead of username and password credentials. This approach previously in AEM 6.4 only worked for Adobe Launch.

When you set this up, note that you will need a separate API integration in the Adobe Developer Console for Launch and Target. I initially thought we could use the same, but that doesn’t work because each integration is tied to just one product.

One roadblock we discovered is that only the actual "admin" user is able to create IMS configurations. Being in the "administrators" group is not good enough. As you can see here, we get an error saying, "user does not have necessary permissions:"


We ended up working closely with our AMS Customer Success Engineer (CSE) to get this configured properly across all the environments. This road-block seems like a product flaw to me so I wouldn’t be surprised to see this fixed in an upcoming service pack.

Other Issues That We Have Run Into
Error: Uncaught ReferenceError: CQ is Not Defined

If you see this error in your browser’s developer console, make sure your clientlib dependencies are correctly set up and included in the proper order.

In our case, we ended up having to add the cq.shared library in the <head> of the page so that the CQ object is defined before any of the Target libraries which rely on it are loaded.

<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientlib.js @ categories='cq.shared'}"></sly>

Error: Get mboxes Request Failed!
There can be many reasons for this error message. It helps to create a custom logger for com.day.cq.analytics.testandtarget.impl to get more visibility into why the API call is failing. Most likely reasons are:
  • Invalid credentials (if still using those instead of IMS)
  • Typo in the client code
  • IMS config does not have proper API integration configured in Adobe.io
We found an interesting edge case for one of our clients. Their client code did not match up with the tenant name in Target. One of their brands was the first to use Target, so that’s what the client code was named after. However, after migrating other brands over and changing the name to the umbrella organization’s name, the Target client code was not kept in sync. It required Adobe support and account management to get involved in resolving the issue. I suspect this is not a very likely edge case.

Creating Activity Fails Silently
The use case here is as follows: You’ve set up the entire integration, and you now want to create a Target activity by targeting components from the AEM interface. After you fill out the "Create Activity" dialog and hit "Save," it confirms that the activity was successfully created. However, in the browser’s developer console, you see a 404 for the activity path (e.g. /content/campaigns/brandname/master/paul-local-xt-test-1/jcr:content.experiences.json).

The issue here seems to be a missing sling:resourceType on the /content/campaigns/brandname/master node which prevents the ActivityUpdateServlet from firing properly and therefore the activity is never actually saved.

This looks like another AEM bug to me so it will hopefully be addressed in the not too distant future.

Launch issue in AEM 6.5.0
If you’re running on AEM 6.5.0 without any service packs, be aware that the Launch integration doesn’t work. An exception message is displayed when trying to edit and save the Experience Manager launch configuration: 

"Postfix-containing path /conf/brandname/settings/cloudconfigs/dtm-reactor/jcr:content/production/async@Typeh int contained in the modification list. Check configuration"

This is a known issue that was addressed by service pack 1.

Additional Resources
Here are some additional resources worth checking out for setting up the AEM/Target integration manually:
Summary
The AEM/Target integration hasn’t changed much between versions 6.4 and 6.5, the main change being the introduction of Adobe’s IMS-based authentication. However, there are still a lot of moving pieces to getting it all set up and working correctly. Use this guide as well as my last one related to 6.4 to help you avoid common pitfalls when integrating AEM 6.5 and Adobe Target.

Source: https://www.bounteous.com/insights/2020/08/18/integrating-aem-6-5-adobe-target/


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.