I have 2 separate XT activities with different audiences where I have added custom code (page load event) for the two activities. Both activities are applied on same location and have different priorities, But I see that even though the Activity/Experience is hidden because of priority still the page load event is added and getting fired.
Topics help categorize Community content and increase your ability to discover relevant content.
Hi Suneel,
Can you elaborate more what you mean by Hidden activity?
Can you confirm status either Inactive or Live?
Thanks
Karuppiah
Hello @Karuppiah_Sakthivel , Thanks for you reply.
I have two activities
Note: A user can belong to both the audience.
Adobe Target evaluates the audience and based on the priority It displays Experience1. But, it also executes both the custom code blocks. Even when Experience 2 is hidden(due to lower priority) Custom code block 2 is executed.
Custom code block 2 is added for frequency capping on how many times user have viewed an experience.
Hi Suneel,
There is no concept of hidden activities in AT. Whenever the activities is deprioritized it is still delivered and executed, only order of the execution changes.
For example: If you run two activities for same URL and same button
1. Activity 1: Changing the button name ( know more) -> Audience: All visitors -> Priority: 999
2.Activity 2: Changing the button name ( Learn More) -> Audience: India-> Priority: 0
Now, both activity will be executed but high priority (Activity1) will be the last one. So the all the visitors will view only the high priority Activity 1.
When you check in the delivery call in the preview itself it will show like below
Offer 0: Activity 2 ( Learn More)
Offer 1: Activity 1 ( Know More)
Kindly refer this URL https://experienceleague.adobe.com/en/docs/target/using/activities/priority
Note: Please let me know the actual requirement, i will provide a solution.
Thanks
Karuppiah
Hello @Karuppiah_Sakthivel ,
Thanks for your reply.
Here is the custom code for each experience. The below event increments the view count of an activity's experience. We keep this count to implement Fatigue rule for an activity. Fatigue rule is implemented in the profile script.
Custom code block #1 for Activity 1
<script>
adobe.target.trackEvent({
mbox: 'experience-experience_interaction',
params: {
activityName_FatigueRule : 'frtest-p1',
activityId : ${activity.id},
maxViews_FatigueRule: "2"
} });
</script>
Custom code block #2 for activity 2
<script>
adobe.target.trackEvent({
mbox: 'experience-experience_interaction',
params: {
activityName_FatigueRule : 'frtest-p2',
activityId : ${activity.id},
maxViews_FatigueRule: "2"
} });
</script>
Profile script:
if (mbox.name == 'experience-experience_interaction') {
var listOfFatiguedActivities = user.get('FatiguedActivityList') || '';
var activityName = mbox.param('activityName_FatigueRule');
if (!activityName) {
return listOfFatiguedActivities;
}
var viewsPerActivityKeyName = activityName + 'numberOfViewsFatigueRule';
// if its an interactiion with your experience then increase the profile-script value by 1
var numberOfViewsFatigueRule = parseInt(user.getLocal(viewsPerActivityKeyName)) || 0;
var maxViewsForFatigueRule = parseInt(mbox.param('maxViews_FatigueRule') || 10); // retrieve parameters from mbox
numberOfViewsFatigueRule = numberOfViewsFatigueRule + 1; // increment the view count
user.setLocal(viewsPerActivityKeyName, numberOfViewsFatigueRule); //set the view count against the user profile
user.setLocal(activityName + 'maxViewsForFatigueRule', maxViewsForFatigueRule); //set the max views limit against user profile for reference
if (numberOfViewsFatigueRule < maxViewsForFatigueRule) {
return listOfFatiguedActivities;
} else {
return listOfFatiguedActivities + ',' + activityName;
}
}
Since both the custom code blocks are running, View count for experience 2 is also incremented even when the experience is not displayed to user due to it's lower priority.
Note: We would need to increment the view count in a similar way to how Analytics for Target would increment an impression. I am assuming activities with a lower priority do not record an impression in Analytics even though the activity is loaded and higher priority activities are displayed in the browser.
Hi Suneel,
I have not encountered this type of scenario. Let me approach with this request.
Also for Analytics for Target or Target Reporting it will count the impression for both activities as well.
Thanks
Karuppiah
Thanks for posting your question @SuneelKumarV, and thanks for sharing your insights @Karuppiah_Sakthivel! @SuneelKumarV were you able to find a solution here ultimately?
Views
Replies
Total Likes
Are you running both of these Activities on your global mbox/location? If so, the global location is configured to return ALL activities that you qualify for and order the return array in accordance with the priority levels. You will have to build custom handling for the "apply" portion of global location.
I would recommend moving to a named mbox / location which is configured to only return ONE thing back to the browser, which should be the higher priority one.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies