Highlighted

Inclusion of mbox.js in AEM page

Avatar

Avatar

prajwalreddy

Avatar

prajwalreddy

prajwalreddy

19-09-2018

We are integrating with Adobe target with AEM 6.3. We are using the Experience fragments approach to personalize the content. However, We already have an mbox included in the template. When we add Target cloud service in AEM and load the page. mbox.js is throwing errors. I have read in one of the documentation that if we want to include any custom mbox.js it should be done via cloud service upload option.

1.Could you please confirm if we are configuring the cloud service there is no need of adding any additional mbox.js on the page as it is already referring to the mbox using the cloud service?

2. Also, If we upload the custom mbox.js would it update the mbox configuration in the adobe target?

Let me know if you need any other information.

Replies

Highlighted

Avatar

Avatar

pranavkaushik

Avatar

pranavkaushik

pranavkaushik

20-09-2018

Hi Prajwal

1) You need to include the cloud service libraries at the page also in the <head> section.

Detail you can find at:

Developing for Targeted Content

2) Yes.you just need to Specify a custom mbox.js file to use as necessary.

Details you can find at:

https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/target-configuring.html

Hope this helps.

Thanks

Pranav

Highlighted

Avatar

Avatar

prajwalreddy

Avatar

prajwalreddy

prajwalreddy

20-09-2018

Thanks Pranav for the reply..It helps

I have follow-up question on this topic. Now we have included the cloudservice related script. It is also including the mbox.js with in AEM and calling it based on the clientcode that we provide. We see a difference in the mbox.js file that is in  this location /etc/clientlibs/foundation/testandtarget/mbox.js and the one in the target.

Could you please let me know if it is going to load the mbox hosted on target on the fly? If Yes, If we update the mboxParameters() function in the target directly we should need not load it as custom js right?

/etc/clientlibs/foundation/testandtarget/mbox.js

Highlighted

Avatar

Avatar

pranavkaushik

Avatar

pranavkaushik

pranavkaushik

20-09-2018

Hi Prajwal,

Yes the default mbox  file is uses to  create mboxes is located at /etc/clientlibs/foundation/testandtarget/mbox/source/mbox.js.

It will load and i dont think that you need to use custom js there.

Hope this helps.

Regards,Pranav