duplicated mbox calls on SPA

Avatar

Avatar
Validate 1
Level 3
kathys75015221
Level 3

Likes

27 likes

Total Posts

24 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 3
kathys75015221
Level 3

Likes

27 likes

Total Posts

24 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
kathys75015221
Level 3

25-02-2019

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

Replies

Avatar

Avatar
Contributor
Level 7
Eric_Vidana
Level 7

Likes

157 likes

Total Posts

151 posts

Correct reply

37 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Contributor
Level 7
Eric_Vidana
Level 7

Likes

157 likes

Total Posts

151 posts

Correct reply

37 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back 25
View profile
Eric_Vidana
Level 7

25-02-2019

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.