Target DataProvider and regional mbox?



I need to call a 3rd part service in coordination with an Activity.  I am looking at DataProviders.  How to tell Target (at.js)  which mbox depends on the data provider? That is, if I have 3 mbox, regional not global, on a particular web page and I need only one of these mbox to depend on the data provider, is this possible?  Every example I find so far sets the data providers on targetGlobalSettings only for the global mbox, but can a data provider be passed to getOffers()?

Accepted Solutions (0)

Answers (3)

Answers (3)



Seems like you are using AT 2.x so you should be able to pass an optional 3rd param into getOffers with the parameters (profile or mbox) that you need for that single call. You would need to call your data provider prior to running the code below and pass some vars around.{
  request: {
    execute: {
      mboxes: [
          index: 0,
          name: "first-mbox"
          index: 1,
          name: "second-mbox",
          parameters: {
            a: 1
          profileParameters: {
            b: 2






I agree with @Eric_Vidana  that you need call your Datasource before executing GetOffer() and How you call GetOffer() depends on What data you are going get and what are you going to use it for ?

For Example : 

If on your site, a dynamic view will load based on the data coming from your data source then you can choose the selector of that view and make your getoffer() exceute when that view loads.


Above is just a random example for a SPA, I would appreciate if you can share your use case in detail.








You can refer the examples here to pass the third party information as mbox parameter




This to fetch the activity content for all the mboxes on the page