Instructions

The below quote should show a Count Down into an image. Each time you refresh the page 3 times, the count down should move. Once you get to the end it will be the default image.

AdobeStock_209904847.jpeg

How it all works

Products/Tools Used:

  • Adobe Launch

  • Adobe Target



Adobe Launch

Launch was just used here to load the Target Libraries into the page as well as send the custom activity ID as a mBox parameter to be picked up by the profile scripts. This was done because profile script will not be able to tell what activity you are in at the moment as activity qualification happens after profile script are executed.



Adobe Target

There is quite a bit of setup required for this.

Firstly a profile script must be created to contain the logic. Inside this script we grab a user parameter that holds how many times this count has been incremented. if it doesn’t exist we just set it to 0. We then compare the activityID in the mBox Parameter with our target activityID, if they match we increment by 1. Afterward we save the new value into the user profile, lastly we return the value of the count. The profile script was called “countDown”

Secondly, we create Audience based on the count. As an example we created the following Audience using the Visitor Profiles with my profile script created above

Audience Name Rules
Count Down 3 user.countDown <= 3
Count Down 2 user.countDown <= 6
Count Down 1 user.countDown <= 9

Lastly , an Experience Targeting Activity was setup. The experience include the three audience created above and the default one which has the image. The main setup to point out here was the ordering of the experience, since each time an experience was loaded 3 time , the next one will need to show up. So the ordering was experience was done as below

  1. Count Down 3

  2. Count Down 2

  3. Count Down 1

  4. Default Experience


Learnings & Gotchas

  • Profile Scripts are ran before Activity Qualification

  • Profile Scripts run on every mBox call