Expand my Community achievements bar.

SOLVED

Multiple mbox requests on a page sending the same entity.id to Target Recommendations?

Avatar

Level 3

Hi, community.

We have pages on our site which we consider as "product view" in case of being visited by a user. Those pages may send not only one "global" mbox requests, they can also send several "not global" mbox requests related to AEM target components included on the page. All mbox requests utilize the same "targetPageParams" function returning entity.id and entity.categoryId values.

 

Now the question:

If a page sends, for example, 3 mbox requests having the same entity.* values, will this fact be treated by Target as if a user has viewed this product page 3 times ?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Yes, each request that contains an entity.id will be understood by Recommendations as a view. Are you using the targetPageParams() or the targetPageParamsAll()? One only applies the global mbox request (or pageLoad request). The "all" version should apply to any request from the page including later getOffers(), or trackEvent() requests. So if you only want the entity.id, entity.categories to get passed on the global request consider moving them to the targetPageParams instead of the targetPageParamsAll.

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Yes, each request that contains an entity.id will be understood by Recommendations as a view. Are you using the targetPageParams() or the targetPageParamsAll()? One only applies the global mbox request (or pageLoad request). The "all" version should apply to any request from the page including later getOffers(), or trackEvent() requests. So if you only want the entity.id, entity.categories to get passed on the global request consider moving them to the targetPageParams instead of the targetPageParamsAll.

Avatar

Community Advisor

Agreed with @Ryan_Roberts_ 

 

You can also look at getOffers and only pass entity to the request that you care about:

 

adobe.target.getOffers({
  request: {
    execute: {
      mboxes: [
        {
          index: 0,
          name: "first-mbox"
        },
        {
          index: 1,
          name: "second-mbox",
          parameters: {
            a: 1
          },
          profileParameters: {
            b: 2
          }
        }
      ]
    }
  }
});

 

however, it will require you updating to the latest version of Adobe Target.