Issues with AEM Target integration | Community
Skip to main content
Level 6
September 24, 2025
Question

Issues with AEM Target integration

  • September 24, 2025
  • 1 reply
  • 727 views

Hello Community,

We have encountered an issue with the AEM Target integration, specifically related to saving and syncing activities in Target. We are receiving an error that does not seem valid in our case, as we have already referenced the audience with the offers/experience. Additionally, the same API integration works in other environments.

We have also verified the permissions for the target group/service account for the relevant paths. Even after restarting the Test and Target bundle, the issue persists. Can someone advise what might be causing this issue and what fix is required to address it? Our AEM version is 6.5 SP22. We are using the out-of-the-box experience fragment component. We also tried using other components, but still had no luck.

 

Verified the following areas:

  • API integration has approver and editor privileges.
  • Cloud service connectivity is in place.
  • Cloud service configuration is updated in the root page.
  • Able to pull audiences from Target.
  • Test and Target replication agent is enabled.

Error:

 

Error Log:

24.09.2025 01:30:24.218 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.TokenManager Aquire result for token content-campaigns-test-target-experience-tst-validation is true
24.09.2025 01:30:24.219 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Generated thirdPartyId is content-campaigns-test-target-experience-tst-validation.
24.09.2025 01:30:24.219 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Would create campaign with title TEST TARGET tst-experience, start null, end null, conversionGoal null, campaignType LANDING_PAGE .
24.09.2025 01:30:24.220 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Reading campaign locations...
24.09.2025 01:30:24.220 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Reading experienceLocalId counter...
24.09.2025 01:30:24.220 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Evaluating experience at /content/campaigns/test/target-experience/test-validation/Test Adventure
24.09.2025 01:30:24.220 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Found segment [Segment# name : null, operator: null, values: [] kind: And, children.size(): 1] at path /etc/segmentation/adobe-target/test/10487659
24.09.2025 01:30:24.220 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Adding external reference segment[Segment# name : TEST Adventure is present, operator: equals, values: [10487699] kind: ExternalReference, children.size(): 0]
24.09.2025 01:30:24.220 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Setting experienceLocalId to 1
24.09.2025 01:30:26.014 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Collecting offers mboxes...
24.09.2025 01:30:26.014 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignRepositoryAdapter Generated object for campaign TEST Validation-target-experience (DISABLED)
24.09.2025 01:30:26.014 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignValidator Validating campaign TEST Validation-target-experience...
24.09.2025 01:30:26.014 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignValidator Experience count must be 0
24.09.2025 01:30:26.014 *ERROR* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignValidator Skipping campaign sync since experience TEST adventure has no offers.
24.09.2025 01:30:26.014 *DEBUG* [sling-threadpool-8fc72537-7a69-4c88-b9ca-4cf057825a94-(apache-sling-job-thread-pool)-19-com_day_cq_replication_job_test_and_target(com/day/cq/replication/job/test_and_target)] com.day.cq.analytics.testandtarget.impl.TokenManager Releasing token content-campaigns-test-portal-target-experience-test-validation

 

@davidjgonzalezzzz @EstebanBustamante @RiteshY18 @Gokul_Agiwal @Umesh_Thakur @pradnya_balvir @Amelia_Waliany @ParitMittal @pradnya_balvir
@Umesh_Thakur @AmitVishwakarma @hrishikeshkagne 

 

 

 

 

 

 

 

1 reply

SantoshSai
Community Advisor
Community Advisor
September 24, 2025

Hi @test1234567,

I would confirm below checklists:

  • Check XF setup: Ensure your experience fragment variation is properly mapped to an mbox/location under “Targeting” before syncing.

  • Publish the XF: Both the XF and referenced assets need to be published to the Publish instance, then synced to Target.

  • Verify offer status: In Target UI, see if the offer shows up as enabled. If not, re-publish and re-sync.

  • Check your package versions: Confirm your cq-target-integration bundles match what Adobe recommends for AEM 6.5 SP22. If not, request the latest compatibility package/hotfix from Adobe Support.

  • Quick test: Instead of XF, try creating a plain text/html offer via AEM–Target integration and sync it. If that works, the issue is specific to XF mapping.

Santosh Sai
Level 6
September 24, 2025

Thank you for your reply. The experience fragment (XF) is correctly referenced to the mbox location, and it was published before attempting to save and sync the activities to Target. The bundle version in both the working and non-working environments is the same, and it is the latest version. I tried both the out-of-the-box XF and a text/html component, but both are experiencing the same issue.

Regarding your suggestion to check if the offer shows up as enabled in the Target UI: since the sync itself is failing, the offer does not appear in the Target UI. Is there something else I should be checking?

 

Also, based on what criteria is it complaining that the experience count is 0? Thanks.


com.day.cq.analytics.testandtarget.impl.synchronization.TargetCampaignValidator Experience count must be 0

SantoshSai
Community Advisor
Community Advisor
September 24, 2025

The message is basically saying that AEM isn’t finding any valid offers inside the experience when it tries to sync to Target. In other words, the campaign object it builds ends up empty, so it skips the sync.

Since you’ve already confirmed the XF is mapped, published, and bundles are the same across environments, the issue is less about UI setup and more about environment differences. A few things I’d double-check:

  • Make sure the Target service user actually has read access on the XF path and any referenced assets.

  • Check in CRXDE if the XF variation has the properties cq:targetEngine and cq:targetLocation set - without these, AEM won’t recognize it as a valid offer.

  • Sometimes replication can be incomplete - ensure the XF and the /etc/segmentation/adobe-target/... nodes are properly published.

If all of that looks fine, I’d suggest turning on TRACE logs for com.day.cq.analytics.testandtarget.impl.synchronization. That will show exactly why AEM is discarding the offers and treating the experience as empty.

Santosh Sai