Expand my Community achievements bar.

SOLVED

Using profile scripts and the VEC

Avatar

Level 2

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 

1 Accepted Solution

Avatar

Correct answer by
Level 2

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

View solution in original post

3 Replies

Avatar

Level 10

Hi Ridder,

The Profile script  seems to be perfectly ok and there should not have been any problem while creating the experience using VEC.  

However to further deep dive into problem and find the root cause it will be required for us to have access to Target Account  you are using to create the activity. Can you please provide your Target Account login Credentials in a private message.

Thanks & Regards

Parit Mittal

Avatar

Correct answer by
Level 2

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

Avatar

Level 2

Hi Akash and Parit,

Thank you for the reply and for the document.  This greatly helped in solving my issue.

Thanks,

Ridder H. Manzanet