Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

AEM - issues with Campaign Standard Forms

Avatar

Level 2

Hello,

I am having 2 issues currently on AEM 6.4 when trying to integrate with Adobe Campaign Standard.

Issue 1:

There is no Adobe Campaign Profile page template available (I can't see where I can make this template available either). And the documentation I am following is : Creating Adobe Campaign Forms in AEM

chlimage_1.png

Issue 2:

Looking at the Adobe Campaign Components documentation, the dialog for my Adobe Campaign Form components have the mapping field disabled:

Screen Shot 2018-08-06 at 11.21.51 AM.png

I have searched through the forums, however the question that was raised did not get answered:

Issue while connecting AEM with Campaign Manager

Please help.

Thanks,

James

14 Replies

Avatar

Level 3

Hi James,

In AEM 6.4, there is no example AEM-Campaign Form Template.

However, it's very easy to create your own.

Steps:

1. Correct resourceSuperType

Make sure the page-component inherits from mcm/campaign/components/profile.
This is required for the servlets to get and save info

Screen Shot 2015-11-01 at 12.54.26 PM.png

2. ContextHub-settings

Make sure the following meta-tag is located in the <head>

<meta id="campaignContextHub" data-register="true" />

3. Campaign properties

The jcr:content node must have the following properties

acMapping -> "mapRecipient" (v6/v7) or "profile" (acs)

acTemplateId -> mail

Screen Shot 2015-11-01 at 12.55.17 PM.png

4. public example

Here a link to a example on a public-repo: https://github.com/Adobe-Marketing-Cloud/aem-adobecampaign-forms-sample

I hope this helps.

Regards

Varun mitra

Avatar

Level 2

Hi Varun,

Thanks for your reply, I have tried to create a page component and inherit from mcm/campaign/components/profile as per your instructions, however I cannot edit the template to allow components to be added into the page.

Upon further investigation, I see that mcm/campaign/components/profile inherits from foundation/components/page, which is the older version of the page component:

Screen Shot 2018-08-08 at 11.58.36 AM.png

In AEM 6.4, the page component we are inheriting is core/wcm/components/page/v2/page and the page templates resides under /conf/<my-site>/settings/wcm/templates - which I think it is not compatible with the old page component.

After digging deeper, I think I just need to allow CTA-Lead-Form component category to continue the steps in Creating Adobe Campaign Forms in AEM .

The only remaining issue I am having is the Campaign Form components' dialog has the mapping field disabled:

Screen Shot 2018-08-06 at 11.21.51 AM.png

And this is my page jcr:content node properties:

Screen Shot 2018-08-08 at 12.23.33 PM.png

I have already checked out the Git sample project, but the structure seems to be in the older version of AEM...

Would you please kindly provide any pointers as to how to get this work in AEM 6.4?

Thanks,

James

Avatar

Employee

Hi James,

If you have access to the system console, try to turn on the debug log for com.adobe.cq.mcm.campaign. In your case, you have to check if your campaign server is returning data for two jssp: amcGetDeliveryMetadata.jssp and amcGetDeliveryTemplate.jssp (you can find the request from the debug log).

Then you have to make sure your contextHub is including the metaData from campaign. To check this, in the chrome console on the page, try "window.top.ContextHub.getAllStores()", you should see "metadata".

Last, I think the value of acMapping should be mapReceipent.

Hope it helps.

R,

James

Avatar

Level 2

Hi jazhou,

How are you doing! Glad to see you respond to my post

Anyway, I have tried your suggestions, and here are the results:

Logging from com.adobe.cq.mcm.campaign:

And window.top.ContextHub.getAllStores() gives me:

Screen Shot 2018-08-22 at 12.53.23 PM.png

I've also updated acMapping to mapRecipient:

Screen Shot 2018-08-22 at 1.00.11 PM.png

But I still can't use the mapping field in the Adobe Campaign component.....

Avatar

Employee

It seems you don't have metadata in your contexthub.

Can you please check if you have done the following in your page?

Make sure the following meta-tag is located in the <head>

<meta id="campaignContextHub" data-register="true" />

Also, try clean your session and login again. The campaign log should have something with amcGetDeliveryMetadata. This is to load the metadata for the template defined in acTemplateId(mail).

Avatar

Level 2

Hi jazhou​,

I've tried to put that meta-tag in the head, however, due to how AEM author works, it is not putting it in the <head> in author mode:

Screen Shot 2018-08-22 at 2.20.25 PM.png

It is under the author mode iframe of the page as per above.

I've even tried to put that meta-tag in the parent page component that my proxyPage inherited from and it is the same.

Since I am trying to author those Campaign components, what else can I do? I've also tried to restart my session, but I still don't see amcGetDeliveryMetadata in the logs (with debug log level).

Avatar

Level 2

Ok, finally have time to type in the solution I have.

Apparently, it is required (hard-coded) to use a page component that is either mcm/campaign/components/profile or a proxy page component from it.

So to get it working, I have to overlay it as /apps/mcm/campaign/components/profile and use my own proxy page component of core/wcm/components/page/v2/page:

/apps/mcm/campaign/components/profile --> /apps/<my-site>/components/structure/page --> core/wcm/components/page/v2/page

In summary, here are the steps to make it work (in 6.4 author):

  • enable CTA-Lead-Form components in template
  • overlay mcm/campaign/components/profile to use core/wcm/components/page/v2/page
  • add page properties of acMapping -> "mapRecipient" and acTemplateId -> "mail"
  • set context hub settings in head: <meta id="campaignContextHub" data-register="true" />

After all that I can see the Adobe Campaign mappings available in the component dialog.

Next is to get it work in Publish...

Avatar

Level 2

I have been testing the Campagin form I created in Publisher as per:

https://helpx.adobe.com/experience-manager/6-4/sites/authoring/using/adobe-campaign-forms.html#Testi...

However, I am not able to get the data to be saved to Adobe Campaign Standard.

I have enabled the logs for com.adobe.cq.mcm.campaign as well (passing the PKey of the profile as the encrypted primary key):

  

What is wrong with the setup? Should I be using something else besides PKey for the encrypted primary key?

Avatar

Employee

"com.adobe.cq.mcm.campaign.profile.ProfileHelper Could not determine profile" expected 200, was 404...

Have you activated your campaign config? Is your publish able to connect campaign instance?

Avatar

Level 2

HI jazhou​,

I have publish the campaign config into the publisher - tested the connection and it works.

But at the moment, I am trying to test it on author instance (in preview)  since I am confident that it has been connected to campaign.

Can you please let me know what are the 3 empty values here:

in the cq-mcm-campaign jar file?

Thanks,

James

Avatar

Level 2

Just a reply to myself:

To work with Adobe Campaign Standard, this is the page property to be set instead:

acMapping -> "profile"

Avatar

Level 2

Hi,

is it really working with all these steps or you did something else too? I was not able to get the adobe campaign button in dialog working though i have tried all the mentioned steps. In browser console, i am getting window.top.ContextHub as undefined.

Avatar

Level 2

I have also struggled for sometime with the same issue. You can follow the steps in this blog post to get it working: https://medium.com/rewrite-tech/how-to-create-adobe-campaign-standard-acs-forms-in-aem-a31ffb1d81de