Showing posts with label Adobe Target. Show all posts
Showing posts with label Adobe Target. Show all posts

Monday, February 3, 2025

Target Configuration Not Resolved While Creating Adobe Target Activity from AEM

I configured the AEM-Adobe Target integration by enabling:

  • IMS configuration for authentication
  • Legacy Adobe Target Cloud Config and New Adobe Target Cloud Config
  • Default workspace assignment in Adobe Developer Console Project
  • Approver permissions for the API credential in the Admin Console




However, when attempting to create an A/B test or Experience Targeting (XT) activity from AEM and sync it to Adobe Target, the Target Configuration dropdown was empty, indicating that no configurations were detected.



Root Cause & Resolution

Upon further analysis, I identified that the issue was due to the user not being part of the target-activity-authors group. After adding the user to this group, the activity creation process began recognizing all available Adobe Target configurations, including both legacy and new configurations.



Now, activities can be successfully created and synced to the default workspace once the experience is defined.

Friday, January 31, 2025

Adobe Experience Manager & Adobe Target: Activity Saved but Not Synchronized – Reason: The following experience has no offers:

When we try to create A/B Testing or Experience Targeting activities from the AEM Activities Console and sync them to Adobe Target










The synchronization fails with the following error, and the status is shown as 'Not Synced'.






The root cause of the issue is that no experience variations were defined for the activity. We created different experiences but did not apply any pages to the activity or enable the required experience changes. To resolve the issue, select the page where this activity should be enabled and target the required components and assign the changes for appropriate experiences. This should allow the activity to sync successfully with Adobe Target.








The activity has now been successfully synced to Adobe Target.





Friday, October 11, 2024

Syncing Segments from Adobe Target to Adobe Experience Manager (AEM)

While integrating Adobe Target with AEM, you can synchronize segments from Adobe Target to AEM. Basic configurations include:

  • Enabling the project with the Adobe Target API in the Adobe Developer Console.
  • Enabling the required workspaces and ensuring proper access for the API credentials via the Admin Console Product Profile (Workspace).
  • Setting up the IMS configuration in AEM.
  • Enabling the Adobe Target Cloud Configuration with segment syncing.


(I will be posting a detailed guide on the integration process soon.)

Issue: Segments Not Syncing

Unfortunately, even after completing all the steps, the segments were not syncing, and I encountered the following exception:

11.10.2024 12:08:37.246 *WARN* [sling-cq-polling-importer-2-/conf/wknd/settings/cloudconfigs/target] com.day.cq.polling.importer.impl.PollingImporterImpl importData: Failed to import PollConfig(/conf/wknd/settings/cloudconfigs/target/jcr:content/segmentsPollConfig): scheme=adobe-target-segments,source=/conf/wknd/settings/cloudconfigs/target,target=/etc/segmentation/adobe-target/tenant,interval=300s,enabled=true

java.lang.NullPointerException: null

at com.day.cq.analytics.testandtarget.impl.SegmentImporter.importData(SegmentImporter.java:159) [com.adobe.cq.cq-target-integration:1.4.60]

at com.day.cq.polling.importer.impl.PollingImporterImpl.importData(PollingImporterImpl.java:561) [com.day.cq.cq-polling-importer:5.13.2]

at com.day.cq.polling.importer.impl.PollingImporterImpl.access$000(PollingImporterImpl.java:72) [com.day.cq.cq-polling-importer:5.13.2]

at com.day.cq.polling.importer.impl.PollingImporterImpl$1.run(PollingImporterImpl.java:463) [com.day.cq.cq-polling-importer:5.13.2]

at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:349) [org.apache.sling.commons.scheduler:2.7.12]

at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [org.apache.sling.commons.scheduler:2.7.12]

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.lang.Thread.run(Thread.java:834)


Resolution

To resolve this issue, ensure that the Day CQ Analytics Segment Importer configuration is enabled.


Additionally, segments will only sync from the Default Workspace at present. Ensure that segments are created under the Default Workspace. In my case, there were no segments under the Default Workspace, which caused the sync to fail.

You can also adjust the polling interval in the Adobe Target Cloud Configuration.

You can adjust the polling interval on Adobe Target Cloud Configuration



Successful Sync

Once I created segments in the Default Workspace, they were successfully synced to the AEM Audience Library. These segments can now be used for A/B testing or Experience Targeting for AEM pages using Adobe Target as the targeting engine.


11.10.2024 14:23:02.976 *INFO* [sling-cq-polling-importer-3-/conf/wknd/settings/cloudconfigs/target] com.day.cq.analytics.testandtarget.impl.SegmentImporter Importing in /etc/segmentation/adobe-target/tenant with dataSource /conf/wknd/settings/cloudconfigs/target

11.10.2024 14:23:02.978 *DEBUG* [sling-cq-polling-importer-3-/conf/wknd/settings/cloudconfigs/target] com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl Target API Request: GET https://mc.adobe.io/tenant/target/audiences?offset=0&modifiedAt=2024-10-10%2F2024-10-12&limit=2000&type=reusable 

11.10.2024 14:23:03.517 *DEBUG* [sling-cq-polling-importer-3-/conf/wknd/settings/cloudconfigs/target] com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl Target API Request: GET https://mc.adobe.io/tenant/target/audiences?deletedAt=2024-10-10%2F2024-10-12&offset=0&limit=2000&type=reusable&status=deleted 

11.10.2024 14:23:03.985 *INFO* [sling-cq-polling-importer-3-/conf/wknd/settings/cloudconfigs/target] com.day.cq.analytics.testandtarget.impl.SegmentImporter Wrote 4 segments under /etc/segmentation/adobe-target/tenant 



Creating Adobe Target Audiences

You can create Adobe Target Audiences in AEM, and they will sync to Adobe Target's Default Workspace.







11.10.2024 14:55:59.150 *DEBUG* [[0:0:0:0:0:0:0:1] [1728676559144] POST /conf/wknd/settings/cloudconfigs/target/jcr:content.audienceupdate.json HTTP/1.1] com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl Target API Request: POST https://mc.adobe.io/tenant/target/audiences?includeMarketingCloudMetadata=true {"name":"Windows","description":"--","targetRule":{"script":"return (((user.browser!=null) && (user.browser.indexOf(\"Windows\")>-1)));"},"type":"reusable","marketingCloudMetadata":{"sourceProductName":"Adobe Experience Manager","editURL":"http://localhost:4502/libs/cq/personalization/touch-ui/content/audiences.html"}}

Start Targeting Button is Disabled in Adobe Experience Manager (AEM) Targeting Mode

The Start Targeting button is disabled when switching to Targeting Mode for pages in AEM.



The issue is that a Brand has not been created. To resolve this, simply create a Brand.

Navigate to Personalization --> Activities


Create a Brand


Now that the Brand is reflected in the Targeting Mode of the page, the Start Targeting button is still disabled. To enable it, create an Activity now.


Select the Targeting Mode: ContextHub or Adobe Target (Adobe Target license required). The Adobe Target option also allows you to enable A/B testing.

Now that the Start Targeting button is enabled, you can begin targeting the content for different experiences and configure other activity settings.


Wednesday, October 9, 2024

Error Exporting to Adobe Target: Create offer request failed! API request failed

We encountered the following error while trying to export Experience Fragments from AEM to the Adobe Target Offer Library, despite completing all the integration steps:

Error:
Error Exporting to Adobe Target: Create offer request failed! API request failed.



09.10.2024 15:18:17.031 *WARN* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] org.apache.sling.engine.impl.request.RequestData RequestProgressTracker not found in request attributes

09.10.2024 15:18:17.035 *INFO* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] com.day.cq.wcm.core.impl.designer.SearchPathLimiter Search path limiter configured with searchPathLimiterFeatureToggleOn: true and searchPathThreshold: true. 

09.10.2024 15:18:17.121 *INFO* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] com.day.cq.analytics.testandtarget.impl.serializer.SaveOfferRequestRestAdapterFactory The Adobe Target offer does not contain JSON.

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $

at com.google.gson.JsonParser.parseReader(JsonParser.java:66) [com.google.gson:2.8.9]

at com.google.gson.JsonParser.parseString(JsonParser.java:47) [com.google.gson:2.8.9]

at com.google.gson.JsonParser.parse(JsonParser.java:98) [com.google.gson:2.8.9]


09.10.2024 15:18:17.766 *ERROR* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] com.adobe.cq.xf.impl.adobetarget.exporter.AbstractExperienceFragmentExporter Create offer request failed!__API request failed

com.day.cq.analytics.testandtarget.TestandtargetException: Create offer request failed!

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.create(RestApiAdapter.java:122) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.createOffer(RestApiAdapter.java:101) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.TestandtargetServiceImpl.createHTMLOffer(TestandtargetServiceImpl.java:65) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.TestandtargetCampaignMediatorImpl.syncOffer(TestandtargetCampaignMediatorImpl.java:539) 


Caused by: com.day.cq.analytics.testandtarget.impl.service.WebServiceException: API request failed

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.request(WebServiceImpl.java:646) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.request(WebServiceImpl.java:600) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.createOffer(WebServiceImpl.java:268) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.create(RestApiAdapter.java:116) [com.adobe.cq.cq-target-integration:1.4.56]

... 193 common frames omitted

Caused by: com.day.cq.analytics.testandtarget.impl.service.WebServiceException: Unexpected response status code [403] for request [https://mc.adobe.io/tenant/target/offers/content?includeMarketingCloudMetadata=true]._{"httpStatus":403,"requestId":"sfdsffgsffsf","requestTime":"2024-10-09T20:18:17.696894302Z","errors":[{"errorCode":"Forbidden.Resource","message":"Access denied. To perform this operation, all of the following privileges are required \"[editor]\".","meta":{}}]}

The actual issue is that the API credentials enabled through the Developer Console project are set to Observer access by default for the selected workspace. However, to successfully export the offer into Adobe Target, a minimum of Editor or Approver access is required.



The issue can be resolved by changing the product role to Editor or Approver through the Admin Console for the corresponding Adobe Target Product Profile (Workspace).

Once the product role is updated to Editor or Approver in the Admin Console for the corresponding Adobe Target Product Profile (Workspace), the export will be successful.



Tuesday, October 8, 2024

No tenant associated with the user profile - Adobe Target integration with AEM

You may encounter the following exception while enabling the integration between Adobe Target and AEM to share Experience Fragments (XF) and enable Targeting from AEM.

This error can occur even after completing all the steps, including creating a project in the Adobe Developer Console, adding the Adobe Target API with the required profiles, and establishing a successful connection in AEM IMS.



However, when testing the Adobe Target Cloud Services integration, the following exception is thrown:



08.10.2024 12:25:18.280 *ERROR* [[0:0:0:0:0:0:0:1] [1728408318089] POST /libs/cq/analytics/testandtarget/command HTTP/1.1] com.day.cq.analytics.testandtarget.impl.servlets.commands.ConnectCommand Get mboxes request failed!

com.day.cq.analytics.testandtarget.TestandtargetException: Get mboxes request failed!

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.listMboxes(RestApiAdapter.java:611) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.checkCredentials(RestApiAdapter.java:88) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.TestandtargetServiceImpl.checkCredentials(TestandtargetServiceImpl.java:180) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.servlets.commands.ConnectCommand.performCommand(ConnectCommand.java:83) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.servlets.CommandServlet.performCommand(CommandServlet.java:69) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.commons.servlets.AbstractCommandServlet.doPost(AbstractCommandServlet.java:49) [com.day.cq.cq-commons:5.12.24]

at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.27.2]

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.27.2]

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.27.2]

at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:551) [org.apache.sling.engine:2.15.14]


Caused by: com.day.cq.analytics.testandtarget.impl.service.WebServiceException: API request failed

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.request(WebServiceImpl.java:646) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.getMboxes(WebServiceImpl.java:413) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.listMboxes(RestApiAdapter.java:600) [com.adobe.cq.cq-target-integration:1.4.56]

... 189 common frames omitted

Caused by: com.day.cq.analytics.testandtarget.impl.service.WebServiceException: Unexpected response status code [403] for request [https://mc.adobe.io/xxxxx/target/mboxes]._{"error_code":"502061","message":"Bad Gateway. No tenant associated with the user profile."}_

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.request(WebServiceImpl.java:643) [com.adobe.cq.cq-target-integration:1.4.56]

... 191 common frames omitted


The issue stems from the Adobe Target Tenant ID not being configured properly. (I will be creating a detailed blog on how to enable the required configurations for integrating AEM with Adobe Target.) It's important to note that the Adobe Target Client Code and Adobe Target Tenant ID are different. The Adobe Target Client Code can be retrieved from the AdministrationImplementation section within Adobe Target.




The Adobe Target Tenant ID can be copied directly from the Adobe Target URL:
https://experience.adobe.com/#/@TenantID/target/setup/implementation.

Simply copy the Tenant ID from this URL and configure it in the AEM Adobe Target Cloud Service. Once configured, the connection should be successful.