<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Show experience 3 times in one AT activity in Adobe Target Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/436209#M7277</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17376245"&gt;&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Full explanation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a profile script to count experience views per visitor&lt;OL&gt;&lt;LI&gt;Target &amp;gt; Audiences &amp;gt; Profile Scripts &amp;gt; Create Script&lt;/LI&gt;&lt;LI&gt;Name it:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;expImpCounts&lt;/EM&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Code:&amp;nbsp;&lt;PRE&gt;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")}
}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;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.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Create audiences for the different experiences based on the priority and max number of impression you want each to see.&lt;OL&gt;&lt;LI&gt;Name your audience. E.g., "Gets Exp C"&lt;OL&gt;&lt;LI&gt;Rule definition: &lt;EM&gt;Visitor Profile:&amp;nbsp;&lt;SPAN class=""&gt;user.expImpCounts &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;equals &amp;gt;&amp;nbsp;&lt;/SPAN&gt;expB:3, expC:1 or expC:2&lt;/EM&gt;&lt;OL&gt;&lt;LI&gt;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.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;In the current audiences UI it will look like this:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ryanr701_0-1641326968708.png" style="width: 400px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/37694i9255AF2EBC2E249C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="ryanr701_0-1641326968708.png" alt="ryanr701_0-1641326968708.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;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):&amp;nbsp;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;Visitor Profile: &lt;/SPAN&gt;&lt;SPAN class=""&gt;user.expImpCounts &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;does not contain (case insensitive) &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;expB or expC&lt;/SPAN&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Build your experience and if using the VEC then add a &lt;A href="https://experienceleague.adobe.com/docs/target/using/experiences/vec/modifications/vec-code-editor.html?lang=en#section_26CB3360097D400FB02E20AE5FDBA352" target="_self"&gt;custom code modification&lt;/A&gt; 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:&lt;/SPAN&gt;&lt;OL&gt;&lt;LI&gt;&lt;PRE&gt;&amp;lt;script&amp;gt;adobe.target.trackEvent({mbox:'impressionCount', params:{'experience':'expA'}});&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;SPAN class=""&gt;Adjust the experience value for the current experience.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class=""&gt;There are likely other ways to make this happen but this should help you get what you are looking for.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2022 20:30:27 GMT</pubDate>
    <dc:creator>Ryan_Roberts_</dc:creator>
    <dc:date>2022-01-04T20:30:27Z</dc:date>
    <item>
      <title>Show experience 3 times in one AT activity</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/435107#M7248</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:31:45 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/435107#M7248</guid>
      <dc:creator>MA1985v1</dc:creator>
      <dc:date>2021-12-20T21:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Show experience 3 times in one AT activity</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/436209#M7277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17376245"&gt;&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Full explanation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a profile script to count experience views per visitor&lt;OL&gt;&lt;LI&gt;Target &amp;gt; Audiences &amp;gt; Profile Scripts &amp;gt; Create Script&lt;/LI&gt;&lt;LI&gt;Name it:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;expImpCounts&lt;/EM&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Code:&amp;nbsp;&lt;PRE&gt;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")}
}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;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.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Create audiences for the different experiences based on the priority and max number of impression you want each to see.&lt;OL&gt;&lt;LI&gt;Name your audience. E.g., "Gets Exp C"&lt;OL&gt;&lt;LI&gt;Rule definition: &lt;EM&gt;Visitor Profile:&amp;nbsp;&lt;SPAN class=""&gt;user.expImpCounts &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;equals &amp;gt;&amp;nbsp;&lt;/SPAN&gt;expB:3, expC:1 or expC:2&lt;/EM&gt;&lt;OL&gt;&lt;LI&gt;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.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;In the current audiences UI it will look like this:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ryanr701_0-1641326968708.png" style="width: 400px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/37694i9255AF2EBC2E249C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="ryanr701_0-1641326968708.png" alt="ryanr701_0-1641326968708.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;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):&amp;nbsp;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;Visitor Profile: &lt;/SPAN&gt;&lt;SPAN class=""&gt;user.expImpCounts &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;does not contain (case insensitive) &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;expB or expC&lt;/SPAN&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Build your experience and if using the VEC then add a &lt;A href="https://experienceleague.adobe.com/docs/target/using/experiences/vec/modifications/vec-code-editor.html?lang=en#section_26CB3360097D400FB02E20AE5FDBA352" target="_self"&gt;custom code modification&lt;/A&gt; 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:&lt;/SPAN&gt;&lt;OL&gt;&lt;LI&gt;&lt;PRE&gt;&amp;lt;script&amp;gt;adobe.target.trackEvent({mbox:'impressionCount', params:{'experience':'expA'}});&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;SPAN class=""&gt;Adjust the experience value for the current experience.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class=""&gt;There are likely other ways to make this happen but this should help you get what you are looking for.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 20:30:27 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/436209#M7277</guid>
      <dc:creator>Ryan_Roberts_</dc:creator>
      <dc:date>2022-01-04T20:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Show experience 3 times in one AT activity</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/436215#M7278</link>
      <description>&lt;P&gt;thanks for the detailed response. will test this one.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 21:07:32 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/436215#M7278</guid>
      <dc:creator>MA1985v1</dc:creator>
      <dc:date>2022-01-04T21:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Show experience 3 times in one AT activity</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/436824#M7321</link>
      <description>&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 15:24:21 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/show-experience-3-times-in-one-at-activity/m-p/436824#M7321</guid>
      <dc:creator>ben_mrm</dc:creator>
      <dc:date>2022-01-11T15:24:21Z</dc:date>
    </item>
  </channel>
</rss>

