Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Target activity viewed for limited number of times

petruskruger
Level 1
Level 1

Good day

We are in the process of integrating Target into our mobile app. We have a use case where we need to show a specific activity for a limited number of times to a customer while the activity is live.

I understand that it may be possible to provide a counter in passing parameters to the mbox (CreateRequest parameters), which can then be interpreted by target to show or not show the activity to the customer.

I have been trying to find information on how this could potentially work, but I have not been able to stumble across an answer.

Does anyone perhaps have an idea in how we can achieve this? It seems like a simple thing to do?

Regards

Petrus

1 Accepted Solution
siddharthjainPM
Correct answer by
Employee
Employee

Hi Petrus

You may use Profile Scripts option to keep a track of visit of a user. Code for this would be something like this (This is just a sample to explain the concept)

------

if(user.sessionId!=user.getLocal('lastSessionId')) {

  1. user.setLocal('lastSessionId', user.sessionId);

return (user.get('visitNumber') || 0) + 1;

}

----

Now, you can use this visitNumber attribute for creating an audience to limit the number of experiences in an Experience Targeting campaign. Since the condition is evaluated every time, as soon as the visit number increases your limit, the user will no longer qualify for the experience.

View solution in original post

2 Replies
Amelia_Waliany
Community Manager
Community Manager

Hi Petrus, thanks for your question! You may want to check out the following sections of the Adobe Target Product Documentation:

(1) iOS - Create a Target Location and Success Metric

(2) Target Methods for iOs

(3) Target Methods for Android

(4) Target for Adobe Mobile Services

Feel free to reach out again here if you have any additional questions as you review these resources - hope this helps!

Warmly,

Amelia

siddharthjainPM
Correct answer by
Employee
Employee

Hi Petrus

You may use Profile Scripts option to keep a track of visit of a user. Code for this would be something like this (This is just a sample to explain the concept)

------

if(user.sessionId!=user.getLocal('lastSessionId')) {

  1. user.setLocal('lastSessionId', user.sessionId);

return (user.get('visitNumber') || 0) + 1;

}

----

Now, you can use this visitNumber attribute for creating an audience to limit the number of experiences in an Experience Targeting campaign. Since the condition is evaluated every time, as soon as the visit number increases your limit, the user will no longer qualify for the experience.

View solution in original post