¸¸Hi,
I want to update my target-global-mbox via a dom ready/non sequential js but I'm not sure about the syntax.
Because of some race condition, I can't create a data element and use it like this
I must call everything as low as possible in my page.
Unless someone have an idea how to get rid of the race condition, while using the standard data element call from a page load rule, I need to confirm if the right syntax to update the target-global-mbox really is like so:
mboxUpdate('target-global-mbox','user.categoryId=dummyValue');
Thanks a lot
-Eric
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Eric,
If I understand correctly you'd like to pass categoryId information to Target. That information isn't available until the "bottom of the page". So you're not able to capture that value at the top of the page for the Target global mbox request.
Here's an option for sending information to Target from data layers, or variables that aren't present until the bottom of the page.
Create a page load rule in DTM. Run at bottom of page. Add a custom Javascript tag that fires a secondary call to Target with the user.categoryId info. Your data element should return a value at the bottom of the page, or you could directly reference the variable.
This is a sample for the script you can use:
adobe.target.trackEvent({mbox:'dataCapture', params:{'user.categoryId':_satellite.getVar(dataElementName)}});
Hi Eric,
If I understand correctly you'd like to pass categoryId information to Target. That information isn't available until the "bottom of the page". So you're not able to capture that value at the top of the page for the Target global mbox request.
Here's an option for sending information to Target from data layers, or variables that aren't present until the bottom of the page.
Create a page load rule in DTM. Run at bottom of page. Add a custom Javascript tag that fires a secondary call to Target with the user.categoryId info. Your data element should return a value at the bottom of the page, or you could directly reference the variable.
This is a sample for the script you can use:
adobe.target.trackEvent({mbox:'dataCapture', params:{'user.categoryId':_satellite.getVar(dataElementName)}});
Thanks Ryan, spot on answer!
Views
Replies
Total Likes
Hi, in Adobe Experience Cloud Debugger, I'm assuming that it is normal now that for each page view I see two calls (one for target-global-mbox and one for datacapture). Does this create an issue in terms of stats or in terms of first load behavior for a user?
But in network tab (".tt.") it's normal that in response I only see the sessionId?
Views
Replies
Total Likes
Yes that is expected an normal. Should be not issues with the secondary call. Any Target call that isn't part of an activity will only have a sessionid as the response.
Views
Replies
Total Likes
Views
Like
Replies
Views
Like
Replies