Expand my Community achievements bar.

Join us for our second AMA on experimentation and personalization strategies with Target, occurring on June 3rd!
SOLVED

How to exclude an activity from another?

Avatar

Level 2

I want to add a condition in my activity (Activity A) to exclude people if they are qualifying for another activity (Activity B). I tried using profile param (user.activeActivities) and checking if activity ID for Activity B is present in the list, if so, exclude the user from Activity A. It is not working.

 

Any suggestions?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @TNxx,

 

On the first page load, the user hasn't yet qualified for either Activity A or B in their profile stored on Adobe Target's edge network. That means:

  • When the visitor hits the page for the first time, they haven't qualified for any activities yet.
  • The decisioning engine can't yet include Activity A or B in user.activeActivities because the decision is being made right now, and profile updates happen after the decision.
  • So user.activeActivities is empty at the moment of initial evaluation, even though the user might end up qualifying for Activity A or B in that request.

 

First visit:

    • Adobe Target makes a decision.
    • Activity is served.
    • The user's profile (including user.activeActivities) is updated after this request.

Second visit (or later):

    • Now, user.activeActivities includes the previous qualification.
    • You can use that to exclude users from other activities.

To enforce mutual exclusivity of Activity A and B on the first visit, you’ll need a different approach. Options include:

  1. Custom Profile Attribute Flag
  • Use a custom profile script like qualifiedForActivityA.
  • In Activity A, set this flag using profile update.
  • In Activity B’s targeting rule, exclude users where qualifiedForActivityA == true.

Caveat: Still subject to same lifecycle delay.

  1. Client-Side Storage (LocalStorage or Cookies)
  • On the client side, once a user is shown Activity A, set a flag in a cookie or localStorage.
  • Use Target's mbox or at.js to read this value into a custom parameter.
  • Use this custom parameter in the targeting logic to exclude users from Activity B.

Thanks.

Pradnya

View solution in original post

5 Replies

Avatar

Level 2

I am trying to understand why the profile scripts won't work in this situation. Also, activities have priority added. Cannot restrict using priority as we are inserting content and have multiple other activities running on same selector. 

Avatar

Level 2

Avatar

Level 2

I don't want users to qualify for activity randomly. What I want is if user qualifies for one Activity A, then it should not qualify for Activity B. And I cannot use audience exclusion for that, as in activity A, we have some profile logic according to which its qualification changes. 

 

All I am trying to understand is why (user.activeActivities) won't work on first load of activity, but it does afterwords.

Avatar

Correct answer by
Community Advisor

Hi @TNxx,

 

On the first page load, the user hasn't yet qualified for either Activity A or B in their profile stored on Adobe Target's edge network. That means:

  • When the visitor hits the page for the first time, they haven't qualified for any activities yet.
  • The decisioning engine can't yet include Activity A or B in user.activeActivities because the decision is being made right now, and profile updates happen after the decision.
  • So user.activeActivities is empty at the moment of initial evaluation, even though the user might end up qualifying for Activity A or B in that request.

 

First visit:

    • Adobe Target makes a decision.
    • Activity is served.
    • The user's profile (including user.activeActivities) is updated after this request.

Second visit (or later):

    • Now, user.activeActivities includes the previous qualification.
    • You can use that to exclude users from other activities.

To enforce mutual exclusivity of Activity A and B on the first visit, you’ll need a different approach. Options include:

  1. Custom Profile Attribute Flag
  • Use a custom profile script like qualifiedForActivityA.
  • In Activity A, set this flag using profile update.
  • In Activity B’s targeting rule, exclude users where qualifiedForActivityA == true.

Caveat: Still subject to same lifecycle delay.

  1. Client-Side Storage (LocalStorage or Cookies)
  • On the client side, once a user is shown Activity A, set a flag in a cookie or localStorage.
  • Use Target's mbox or at.js to read this value into a custom parameter.
  • Use this custom parameter in the targeting logic to exclude users from Activity B.

Thanks.

Pradnya

Avatar

Level 2

Thanks for the explanation!