3 Replies Latest reply on May 17, 2016 7:49 AM by Ridder_M

    Using profile scripts and the VEC



      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
              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.