Adobe Target: mbox Paramter Update

Avatar

Avatar

ruchitam1208080

Avatar

ruchitam1208080

ruchitam1208080

21-06-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

manisha17383587

Avatar

manisha17383587

manisha17383587

26-06-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>

Answers (5)

Answers (5)

Avatar

Avatar

ruchitam1208080

Avatar

ruchitam1208080

ruchitam1208080

26-06-2017

Hi,

When I select the DOB from the form page

1237810_pastedImage_0.png

I can see the DOB is passed in mbox parameter

1237901_pastedImage_1.png

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?

Avatar

Avatar

manisha17383587

Avatar

manisha17383587

manisha17383587

23-06-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);

    });

Avatar

Avatar

ParitMittal

Avatar

ParitMittal

ParitMittal

23-06-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

Avatar

Avatar

ruchitam1208080

Avatar

ruchitam1208080

ruchitam1208080

22-06-2017

I am using mbox.js

Avatar

Avatar

manisha17383587

Avatar

manisha17383587

manisha17383587

22-06-2017

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