Skip to main content
Level 2
Mar 11, 2020 12:55 PM UTC
Question

user.activeActivities always null in Profile Script?

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
Apr 3, 2020 9:13 AM UTC
Anyone?
Translate
Adobe Employee
Sep 21, 2023 11:32 PM UTC

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'; } }

 

Translate
New Member
Nov 21, 2023 3:39 PM UTC

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.

Translate