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

SOLVED

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

Kirill812
Level 2
Level 2

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
ryanr701
Correct answer by
Employee
Employee

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
ryanr701
Correct answer by
Employee
Employee

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

Eric_Vidana
Level 8
Level 8

Agreed with @ryanr701 

 

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.