Profile script issue - fire once per site visit

Description description

Adobe Target

Using a custom profile script that reads when a visitor has visited a specific URL, it will then create and return a score.

By default the score is 0, if the visitor lands on the page, the score would then increment by 1, then by using audience rules I can then say after a visitor has seen the experience more than 2 times don’t show the experience.

Also you want the score to be cleared when a user’s session has finished, so when they return to the site their score defaults back to 0.

As this is based off the Visitor Profile, you would have to wait until the Visitor Profile is refreshed (14 days by default) for the score to default back to 0.

If you use user.isNewSession and each time it’s true, it then re-sets the profile score back to 0.

Does this mean after 30 minutes of the Visitor not being active it will re-set the score?

Or is their an easier way to have the Profile Scripts fire once by individual Visit, and not by the Visitors Profile?

Resolution resolution

If a user returns to the site without clearing cache and cookies, then Target would treat the session as same and will put that user in the profile script (if the user satisfies the condition).

  • A Target session ends only after 30 minutes of inactivity (silence) or after clearing cache and cookies.
  • If you want to show the experience on the first visit of a session,  you can achieve this by writing the profile script that returns the count.
  • Then you can use this profile script in the target activity audience as Visitor Profile (user.yourProfileScriptName equals static value 1).

This will ensure the Target delivery only on the first visit of the session. This will deliver the experience even after 30 minutes of the activity or after clearing cache and cookies.