Using profile scripts and the VEC

Avatar

Avatar

Ridder_M

Avatar

Ridder_M

Ridder_M

09-05-2016

Hello,

I setup the following profile script to match the birthday month of the person:

//get birthday month from both profile and current month
  var bday = profile.get('birthday');
  var dt = new Date();
  var mt = ("0" + (dt.getMonth() + 1)).slice(-2);

  // if both months are the same, return true
  if (bday == mt){
     return 'BirthdayGroup';
  }
  // return false if the birthday month is different from current month
  else{
        return 'NonBirthdayGroup';
  }

I used the above code to create an audience of visitors that are in the "Birthday Month".  I tried to create an Experience Targeting activity on the page http://test.manzanet.us/, using the VEC to change the copy of the headline.  Unfortunately, it didn't work, but if I create the Experience Targeting activity using the Form-based Experience Composer, it works but it sticks the copy on the top of the page.  Is there anything that I need to do in the VEC, so the test works?  I really appreciate the help.

Thanks,

Ridder 

View Entire Topic

Avatar

Avatar

akashj80621328

Avatar

akashj80621328

akashj80621328

10-05-2016

Hi Ridder,

I debugged your website implementation and found that you are explicitly creating target-global-mbox through mboxCreate() call. Global mbox is auto created and there is no need to explicitly make an mboxCreate call. To pass parameters to the mbox call we recommend you to use the targetPageParams() method as described in https://marketing.adobe.com/resources/help/en_US/target/ov/c_pass_parameters_to_global_mbox.html

Explicit mboxCreate() call might be over writing targeted content with default content on your page.

Let us know if this fixes the problem.

 

Thanks,
Akash