user.activeActivities always null in Profile Script? | Community
Skip to main content
Level 2
March 11, 2020
Question

user.activeActivities always null in Profile Script?

  • March 11, 2020
  • 3 replies
  • 3218 views

Hi I'd like to create a test that isnt expose to visitors qualifying for a specific test earlier in the journey i.e. on homepage.

I tried creating the following Profile Script and using this in my audience but based on debugging/ trace it seems like activeActivities always returns an empty array in the profile script.

if(!user.get('not_in_homepage_activity')){ if(user.activeActivities.indexOf(123456) == -1){ return 'true'; } }

How can i resolve this?

 



 

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

3 replies

Level 2
April 3, 2020
Anyone?
Adobe Employee
September 21, 2023

Hi, @richardlee-1 it's about the hard typing at the user attributes, in that case you'll need to convert the user.activeActivities array to a string by adding .join right after it:

 

if(!user.get('not_in_homepage_activity')){ if(user.activeActivities.join.indexOf('123456') == -1){ return 'true'; } }

 

New Member
November 21, 2023

I encountered this issue. The answer is that any combination of get, profile, user, activeActivities,  whatever will crash the profile script. It will not process anything past the point you introduce it.

 

What does work:
user.activeCampaigns
What is it?
An array of integers referring to active target activities.