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.

Mbox.js to At.js upgrade causing < Uncaught ReferenceError: CQ_Analytics is not defined > console error

Avatar

Level 3

Hi @Ryan_Roberts_ ,

I recently got below Alert when logged into Adobe Target, so I started migrating mbox.js to at.js and as part of that installed Adobe TargetV2 Launch extension(we are using Adobe Launch for Tag Management) and modified the All Pages - Library loaded rule, and we had mbox.js calls replaced with , https://clientId.tt.omtrdc.net/rest/v1/delivery?    which i am thinking is pretty much the upgrade process, but we started seeing Uncaught ReferenceError: CQ_Analytics is not defined console error

image-20200715-141805 (1).pngCapture.PNG

Can someone let know what was missed? we are using AEM 6.5.5

We are also implementing Component Targeting using Target Engine, but the targeted experience is loading and the disappearing on the page for the components which had some action, Is that because of this as well? Can someone guide please?

Appreciate any responses!!

Thanks,

Ganesh

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Employee Advisor

Are you using any async methods for at.js injection. It can sometime create the mentioned error.

 

Can you try making at.js inclusion a synchronous call and confirm the same.

Avatar

Level 3

Hi Nirmal,

 

Thanks for the response, CQ_Analytics is undefined error is gone with addition of cq.widgets category call  <sly data-sly-call="${clientlib.all @ categories='cq.widgets'}"></sly>  in the page load component and making the launch call Asynchronous , We are injecting at.js using Adobe Launch Target extension , but targeted components don't render any dynamic functionality , 

 

For example we have a Hero Carousel Component targeted where the carousel images doesn't change and the cat button on the carousel doesn't work ,  seems to be some load order issue or some JavaScript issue, any ideas please?

 

Thanks,

Ganesh

Avatar

Employee Advisor
Cool, thats one step forward. Are you loading the launch script in the head itself ? Does it have any attributes like async, defer etc?

Avatar

Level 3

I am loading the launch script by Cloud Configuration (secured via IMS), there's an option to switch between sync and async , Though i load it asynchronously the targeted component is not loading as it should

 

Appreciate any ideas?

 

Thanks,

Ganesh