Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

duplicated mbox calls on SPA

kathys75015221
Level 3
Level 3

Hello

We have a few affected pages that are sending multiple calls to mbox are in a VueJS single page app. We have at.js implemented once in the page and universal-spa.combined.min.js directly after it as recommended here - https://github.com/Adobe-Marketing-Cloud/target-atjs-extensions/wiki/Universal-SPA

Currently we are using the out of the box configuration for the Universal SPA in live and this is producing multiple mbox calls.

Our developer has made a change in our test environment to use the suggested simple config for Universal SPA:

  1. adobe.target.ext.universal.router({rules:[{mbox:'target-global-mbox'}]});

but this is still producing 2 mbox calls...

There is no additional configuration or code within our web app for Target and we are simply including the 2 Adobe provided javascript files in the page. Please can anyone advise how we can make only one mbox call from our page please?

1698665_pastedImage_0.png

1 Reply
Eric_Vidana
Level 8
Level 8

Without seeing the initiator on for those calls, I presume that the first (or second) is coming from the at.js base code property:

globalMboxAutoCreate: true

Might want to set that to false if you are going to invoke the target-global-mbox on your own as the router goes to work. I am no expert in SPA, just an observation.