Expand my Community achievements bar.

SOLVED

Show experience 3 times in one AT activity

Avatar

Level 3

Hi,

 

In an activity, i have 5 different experience/offer. I would like to show each experience only for 3 times and move on it to next experience and so on. This should work based on the priority setup in the activity.

 

Any suggestions?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @MA1985v1,

This can be done with some customization and an XT or Experience Targeting activity. An XT activity will allow you to create experiences and then prioritize the order that a visitor qualifies for them. Move experiences to the top for higher priority. Tracking the views of each experience is where the customization comes in. You need to fire a request back to Target so it can "count" views of a particular experience. This way you can increment a profile script that can be used in an audience definition.

Full explanation:

  1. Create a profile script to count experience views per visitor
    1. Target > Audiences > Profile Scripts > Create Script
    2. Name it: expImpCounts
    3. Code: 
      if (mbox.name == 'impressionCount') {
      	var exp = mbox.param('experience');
      	var cur = user.get("expImpCounts");
      	try {var cur = cur.split(":")} catch(err) {cur = [];}
      	if (cur[0] == exp) { return (exp+":"+(parseInt(cur[1])+1))}
      	else {return (exp+":1")}
      }
    4. This will return the experience name (you'll later pass as an mbox parameter) and a count of the view. In my example, I'll call my experiences: expA, expB, expC...so values will end up looking like: expA:1 or expB:3.
  2. Create audiences for the different experiences based on the priority and max number of impression you want each to see.
    1. Name your audience. E.g., "Gets Exp C"
      1. Rule definition: Visitor Profile: user.expImpCounts > equals > expB:3, expC:1 or expC:2
        1. This means once they've seen experience B 3 times I want them to qualify to see experience C and continue to see it even if they've seen experience C 1 or 2 times previously.
      2. In the current audiences UI it will look like this: ryanr701_0-1641326968708.png

         

    2. Set similar audiences for the other experiences in your activity. The exception is the first experience which needs a slightly different audience rule since it will be the one visitors first qualify for. You could define it like this (making sure it has the lowest priority - so listed last): 
      Visitor Profile: user.expImpCounts > does not contain (case insensitive) > 
      expB or expC
  3. Build your experience and if using the VEC then add a custom code modification to each of them with a simple script tag to fire the "impression" signal back to Target. The custom code modification could look like this:
    1. <script>adobe.target.trackEvent({mbox:'impressionCount', params:{'experience':'expA'}});</script>
      Adjust the experience value for the current experience.

There are likely other ways to make this happen but this should help you get what you are looking for.

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hi @MA1985v1,

This can be done with some customization and an XT or Experience Targeting activity. An XT activity will allow you to create experiences and then prioritize the order that a visitor qualifies for them. Move experiences to the top for higher priority. Tracking the views of each experience is where the customization comes in. You need to fire a request back to Target so it can "count" views of a particular experience. This way you can increment a profile script that can be used in an audience definition.

Full explanation:

  1. Create a profile script to count experience views per visitor
    1. Target > Audiences > Profile Scripts > Create Script
    2. Name it: expImpCounts
    3. Code: 
      if (mbox.name == 'impressionCount') {
      	var exp = mbox.param('experience');
      	var cur = user.get("expImpCounts");
      	try {var cur = cur.split(":")} catch(err) {cur = [];}
      	if (cur[0] == exp) { return (exp+":"+(parseInt(cur[1])+1))}
      	else {return (exp+":1")}
      }
    4. This will return the experience name (you'll later pass as an mbox parameter) and a count of the view. In my example, I'll call my experiences: expA, expB, expC...so values will end up looking like: expA:1 or expB:3.
  2. Create audiences for the different experiences based on the priority and max number of impression you want each to see.
    1. Name your audience. E.g., "Gets Exp C"
      1. Rule definition: Visitor Profile: user.expImpCounts > equals > expB:3, expC:1 or expC:2
        1. This means once they've seen experience B 3 times I want them to qualify to see experience C and continue to see it even if they've seen experience C 1 or 2 times previously.
      2. In the current audiences UI it will look like this: ryanr701_0-1641326968708.png

         

    2. Set similar audiences for the other experiences in your activity. The exception is the first experience which needs a slightly different audience rule since it will be the one visitors first qualify for. You could define it like this (making sure it has the lowest priority - so listed last): 
      Visitor Profile: user.expImpCounts > does not contain (case insensitive) > 
      expB or expC
  3. Build your experience and if using the VEC then add a custom code modification to each of them with a simple script tag to fire the "impression" signal back to Target. The custom code modification could look like this:
    1. <script>adobe.target.trackEvent({mbox:'impressionCount', params:{'experience':'expA'}});</script>
      Adjust the experience value for the current experience.

There are likely other ways to make this happen but this should help you get what you are looking for.

Avatar

Level 3

thanks for the detailed response. will test this one.

Avatar

Level 4

Would you be able to explain how this concept might be used to deliver an experience once per day? Perhaps you could show what that profile script might look like?