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
BedrockMission!

Learn More

View all

Sign in to view all badges

Reco - Need to pass entity.categoryId in globalMbox via script

Avatar

Avatar
Validate 1
Level 3
eric9876588
Level 3

Likes

31 likes

Total Posts

17 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
eric9876588
Level 3

Likes

31 likes

Total Posts

17 posts

Correct Reply

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

28-03-2019

Hi,

We're using DTM to fetch elements in the DOM of the page and put this in dataelement.  To use criteria to show recommended articles based off of the category of the viewed article, I need to pass entity.categoryId to target-global-mbox

For race condition reasons, I can't use the fields in the Adobe Target widget of the page load rule, so I use the Javascript / Third Party Tags widget to do this, on a "onLoad" condition, to make sure that my dataelement is populated.  Note that if I use static value, I can use the Adobe Target widget, but it's not an option since we have a lot of categories and this would translate in creating multiple rules, multiple criteria, multiple Target activities... not scalable.

I'm using this to pass the categoryId to target-global-mbox

adobe.target.trackEvent({

    mbox:'target-global-mbox',

    params:{

      'entity.categoryId':_satellite.getVar("schemaPageCategory")

    }

  }

  );

Now, with this, I see that Target has a second call to target-global-mbox with entity.categoryId in it, but my mboxTrace continues to state that Target can't locate a categoryId value.

My reasoning of this problem is that the reco engine only fires on the first target-global-mbox call (where there is no entity.categoryId yet) and is not taking into account the second call (where I send that value).

Two questions for you:

  1. Could this be because the recs criteria doesn't understand the second target-global-mbox call?
  2. How could I make sure the recs engine retrieves the entity.categoryId at the right time?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Shape 25
MVP
Andrey_Osadchuk
MVP

Likes

524 likes

Total Posts

945 posts

Correct Reply

255 solutions
Top badges earned
Shape 25
Bedrock
Coach
Boost 500
Affirm 250
View profile

Avatar
Shape 25
MVP
Andrey_Osadchuk
MVP

Likes

524 likes

Total Posts

945 posts

Correct Reply

255 solutions
Top badges earned
Shape 25
Bedrock
Coach
Boost 500
Affirm 250
View profile
Andrey_Osadchuk
MVP

04-04-2019

Eric,

  • Can you see the desired/expected behaviour on the 3rd mbox call?
  • If you want to see the expected behaviour on the 2nd mbox call and you are happy with possible flickering effect (I presume the page is loaded/rendered at the time the 2nd call is sent), then consider replacing the event call with the getOffer/applyOffer call.

Answers (0)