Breaking

Wednesday, May 29, 2019

What are Profile scripts / profile attributes in Adobe target ?

What is profile script and how to create a profile script in Adobe Target?

A profile script in Adobe target is a snippet of JavaScript which saves an attribute about a visitor. These attributes are stored in the visitor's profile. We can use these profile attributes for targeting.


To set up profile attributes go to Audiences tab and click on Profile Scripts


click on audience



click on profile script


After clicking Profile scripts, Click on + Create Script button. You would see the following screen after clicking on the create script button.

Adobe target mbox

There are two types of profile attributes available:

  1. Mbox
  2. Script
Profile scripts run profile attribute "catchers" on each location request. When a location request is received, Target determines which activity should run and displays content that is appropriate to that activity and that experience, tracks the success of the activity, and runs any relevant profile scripts. 

This enables you to track information about the visit, such as the visitor's location, time of day, number of times that visitor has been to the site, if they've purchased before and so on.

This information is then added to the visitor's profile so you can better track that visitor's activity on your site.

Profile script attributes have the user tag inserted before the attribute name. For example:

if (mbox.name == 'Track_Interest') { 
    if (profile.get('model') == "A5" &&; profile.get('subcat') == "KS6") { 
        return (user.get('A5KS6') || 0) + 1; 
    } 
}



  1. Refer to profile script attributes (including itself) in the code with user.get('parameterName')
  2. Save variables that may be accessed the next time the script is run (on the next mbox request) with user.setLocal('variable_name', 'value'). Reference the variable with user.getLocal('variable_name'). This is useful for situations where you want to reference the date and time of the last request.
  3. Parameters and values are case sensitive. Match the case of the parameters and values you will receive during the campaign or test.
  4. See the "JavaScript reference for script profile parameters" section below for more JavaScript syntax.

In Some situations target can disable your profile script automatically

Target will disable your profile script in some cases, you would see an yellow warning icon on profile script status ,this happens mainly if, profile scripts are taking too long to execute or have to many instructions (lines of decision making code)

Inactive


Few common reasons for system to disable profile script :

  • An undefined variable to referenced.
  • An invalid value is referenced. This is often caused by referencing URL values and other user-inputted data without proper validation.
  • Too many JavaScript instructions are used. Target has limit of 2,000 JavaScript instructions per script, but this cannot simply be calculated by manually reading the JavaScript.

By default, visitor profiles are stored for 14 days. This profile lifetime can be extended.
Contact Client Care or your Adobe consultant to extend the profile lifetime at no additional cost. The lifetime can be set to as many as 90 days.

For more information read my full post on Adobe Target Visitor's Profile

Training Video for how to create "Profile Script" in Adobe Target :

https://video.tv.adobe.com/v/17394/?quality=12


Thanks ! have a good day ! ☺✌  Keep Coding.. </>

No comments:

Post a Comment

Featured Post

[Solved] How to get current location of user using javascript?(Example code)

How to get the current location of a user using javascript? You might think to get a user's location is a difficult task, but it&...

Popular Posts