Adobe Target: mbox Paramter Update | Community
Skip to main content
ruchitam1208080
Level 2
June 21, 2017
Solved

Adobe Target: mbox Paramter Update

  • June 21, 2017
  • 6 replies
  • 7276 views

I have wrote script like whenever user enters the Date of Birth the mbox will update with DOB:"06/06/2017" means DOB parameter will be pass in mbox.

My concerns is I am updating DOB on form page and I need to show the DOB value in the home page which user has already selected on form page.

Please guide to solve this issue

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by manisha17383587

Hi Ruchika,

If you wish to persist DOB for the user then you need to store DOB in profile based on your mbox settings it will last for 30 days or more and you can use it on different page.

while creating mbox or updating mbox you can use below syntax to store it in profile.

<script>

  mboxCreate('mboxName','mboxName','profile.DOB=06/23/2017','param2=value2');

</script>

or

<script>

mboxDefine('someId','mboxName','profile.DOB=06/23/2017','param2=value2');

mboxUpdate('mboxName','param3=value3','param4=value4');

</script>

once it's stored in profile at your home page offer code can read it with below code

<script>

mboxFactoryDefault.addOnLoad(function(){

        //use strDOB variable and set it in banner.

        var strDOB = "${profile.DOB}";

        console.log("skus" +strDOB);

});

</script>

6 replies

Level 2
June 22, 2017

Hi Are you using mbox.js or at.js?

ruchitam1208080
Level 2
June 23, 2017

I am using mbox.js

ParitMittal
Level 10
June 23, 2017

Hi Ruchika,

Thanks for reaching out to Adobe Target Community.

Løjmannryanr8 Can you please provide your expert inputs on the above query ?

Regards

Parit Mittal

Level 2
June 23, 2017

Hi Ruchika,

you can use code as given below.

Using "${}" you can access all profile and mbox variables in offer code.

on mbox load I am accessing DOB variable using $ and storing value in strDOB

mboxFactoryDefault.addOnLoad(function(){

        var strDOB = "${mbox.DOB}";

        console.log("skus" +skus);

    });

ruchitam1208080
Level 2
June 26, 2017

Hi,

When I select the DOB from the form page

I can see the DOB is passed in mbox parameter

Now this is happening on form page but My requirement is to show a banner on home page based on DOB if selected on form page so if user comes next day on home page, I can show the customize one to person falls before June and after June on Home. How can I achieve that?

manisha17383587Accepted solution
Level 2
June 26, 2017

Hi Ruchika,

If you wish to persist DOB for the user then you need to store DOB in profile based on your mbox settings it will last for 30 days or more and you can use it on different page.

while creating mbox or updating mbox you can use below syntax to store it in profile.

<script>

  mboxCreate('mboxName','mboxName','profile.DOB=06/23/2017','param2=value2');

</script>

or

<script>

mboxDefine('someId','mboxName','profile.DOB=06/23/2017','param2=value2');

mboxUpdate('mboxName','param3=value3','param4=value4');

</script>

once it's stored in profile at your home page offer code can read it with below code

<script>

mboxFactoryDefault.addOnLoad(function(){

        //use strDOB variable and set it in banner.

        var strDOB = "${profile.DOB}";

        console.log("skus" +strDOB);

});

</script>