Behavior Listening

Behavior Listening allows you to modify the value of a visitor's profile properties based on their behavior. The behaviors that can be monitored are:

  • The visitor visits a location containing the defined word(s).
  • The visitor clicks in an area containing the defined word(s).
  • The visitor visits a URL containing the defined word(s).
  • The specified social media event is detected.
  • An advanced event occurs in a social media or other type of context.

If you define more than one rule, they are executed independent of each other. Each of the rule types is described below.


Behavior Listening configuration

To configure a Behavior Listener, add one or more rules by selecting a type and clicking the "Add Rule" button:

add-rule.png

Select a rule type below for complete information on how to define it.

Content
Click / Tap
URL / Mobile Screen
Social Event
Advanced Event


Content

The "Content" rule adds, sets, or sums the value of a profile property based on words that are present at the specified position on a web page that a visitor sees. Follow the steps below to define a "Content" rule. If a rule parameter appears in red, that indicates that it is incompletely defined.

  1. Define how the value is set (Add/Set/Sum).
  2. Define the value that will be set by the rule.
  3. Select the profile property for which you want to set the specified value.

Define the area where the specified word(s) must appear

  1. Click the "any header" link to define the area of the channel in which the defined words must appear.
  2. To define the area based on standard HTML, expand the drop-down list and select the HTML that must contain the defined word(s) (Heading 1", "any Heading 2", and so forth).
  3. To define the area using a JQuery Selector or the Visual Picker, click "Custom defined area". Two new fields appear below: "Name" and "Selector".
  4. To define the area using a JQuery Selector, enter the valid JQuery selector that identifies the custom area in the "Selector" field. For complete information on jQuery selectors, see http://api.jquery.com/category/selectors/.
  5. To define the custom area using the Visual Picker, click the "Visual Picker" link.
  6. Click [OK].

Define the word(s) that must appear in the specified area

  1. Select whether the header or defined area must either contain the defined word(s) or must be an exact match with the defined word(s).
  2. Click the "any word" link if you want to define a specific word or words that must appear in the specified header or defined area.
  3. Select "Define word(s)".
  4. Enter a word in the text field and then click [Add].
  5. Repeat the above step for each word you want to add. If you enter more than one word, they have an OR relationship with each other which means any of the specified words satisfies the rule.
  6. Click [OK].
  7. Click [Save].

When you have finished, the rule as it is defined is shown. For example:

content.png


Click / Tap

The "Click / Tap" rule adds, sets, or sums the value of a profile property if the visitor clicks at the specified position on a web page and the defined word(s) appear in the specified position. Follow the steps below to define a "Click" rule. If a rule parameter appears in red, that indicates that it is incompletely defined.

  1. Define how the value is set (Add/Set/Sum).
  2. Define the value that will be set by the rule.
  3. Select the profile property for which you want to set the specified value.

Define the area where the specified word(s) must appear

  1. Click the "any area" link to define the area of the channel in which the defined words must appear.
  2. To define the area based on standard HTML, expand the drop-down list and select the HTML that must contain the defined word(s) (Heading 1", "any Heading 2", and so forth).
  3. To define the area using a JQuery Selector or the Visual Picker, click "Custom defined area". Two new fields appear below ("Name" and "Selector".
  4. To define the area using a JQuery Selector, enter the valid JQuery selector that identifies the custom area in the "Selector" field. For complete information on jQuery selectors, seehttp://api.jquery.com/category/selectors/.
  5. To define the custom area using the Visual Picker, click the "Visual Picker" link.
  6. Click [OK].

Define the word(s) that must appear in the specified area

  1. Select whether the header or defined area must either contain the defined word(s) or must be an exact match with the defined word(s).
  2. Click the "any word" link if you want to define a specific word or words that must appear in the specified header or defined area.
  3. Select "Define word(s)".
  4. Enter a word in the text field and then click [Add].
  5. Repeat the above step for each word you want to add. If you enter more than one word, they have an OR relationship with each other which means any of the specified words satisfies the rule.
  6. Click [OK].

Define the click area

  1. Click the "define click area" link to define the area of the channel in which the defined words must appear. Two new fields appear below ("Name" and "Selector".
  2. To define the area using a JQuery Selector, enter the valid JQuery selector that identifies the custom area in the "Selector" field. For complete information on jQuery selectors, seehttp://api.jquery.com/category/selectors/.
  3. To define the custom area using the Visual Picker, click the "Visual Picker" link.
  4. Click [OK].
  5. Click [Save].

When you have finished, the rule as it is defined is shown. For example:

click.png


URL / Mobile Screen

The "URL / Mobile Screen" rule adds, sets, or sums the value of a profile property based on words that are present in the URL and/or referring URL. Follow the steps below to define a "URL" rule. If a rule parameter appears in red, that indicates that it is incompletely defined.

  1. Define how the value is set (Add/Set/Sum).
  2. Define the value that will be set by the rule.
  3. Select the profile property for which you want to set the specified value.

Define the URL and/or referring URL

  1. Click the "URL or referring URL" link.
  2. Select one of the three options for the URL(s) that must contain the defined words to satisfy the rule.
  3. Click [OK].

Define the word(s) that must appear in the URL or referring URL (or both)

  1. Select whether the URL or referring URL (or both must either contain the defined word(s) or must be an exact match with the defined word(s).
  2. Click the "any word" link if you want to define a specific word or words that must appear in the URL or referring URL (or both).
  3. Select "Define word(s)".
  4. Enter a word in the text field and then click [Add].
  5. Repeat the above step for each word you want to add. If you enter more than one word, they have an OR relationship with each other which means any of the specified words satisfies the rule.
  6. Click [OK].
  7. Click [Save].

When you have finished, the rule as it is defined is shown. For example:

url.png


Social Event

The "Social Event" rule adds, sets, or sums the value of a profile property if an event in the specified social media is detected. Follow the steps below to define a "Social Event" rule. If a rule parameter appears in red, that indicates that it is incompletely defined.

  1. Define how the value is set (Add/Set/Sum).
  2. Define the value that will be set by the rule.
  3. Select the profile property for which you want to set the specified value.
  4. Click the "select event" link.
  5. Expand the drop-down list to select a social media event. You have the following choices:

    Event Description
    Facebook Like The visitor has clicked a Facebook "Like" button.
    Facebook Unlike The visitor has clicked a Facebook "Unlike" button.
    Google Plus One The visitor has clicked a Google +1 button.
    LinkedIn Share The visitor has clicked a LinkedIn "Share" button.
    Twitter Follow The visitor has begun following someone on Twitter.
    Twitter Tweet The visitor has sent a Tweet from their Twitter account.


  6. Select the social media event from the drop-down list.
  7. Click [OK].
  8. Click [Save].

When you have finished, the rule as it is defined is shown. For example:


Advanced Event

The "Advanced Event" rule adds, sets, or sums the value of a profile property based on the receiving of an event with a context that contains the defined word(s) in any or in a specified value. The event can be either a social media event or a custom defined event. The context received from the event contains an array of values and you can specify whether the word match must be in a specific value (any value, the first value, the second value, or the third value). Naturally, you must know what the format of the context is in order to be able to correctly formulate the rule. Contact your application manager or developer for complete information on using the "Advanced Event" rule.

Follow the steps below to define an "Advanced Event" rule. If a rule parameter appears in red, that indicates that it is incompletely defined.

  1. Define how the value is set (Add/Set/Sum).
  2. Define the value that will be set by the rule.
  3. Select the profile property for which you want to set the specified value.

Define the event

  1. Click the "define event" link.
  2. To select a social media event, click the radio button next to the drop-down list and expand the list.
  3. Select the event from the list. The options are:

    Event Description
    Facebook Like The visitor has clicked a Facebook "Like" button, either on Facebook itself or on a website that has a Facebook "Like" button.
    Facebook Unlike The visitor has clicked a Facebook "Unlike" button, either on Facebook itself or on a website that has a Facebook "Unlike" button.
    Google Plus One The visitor has clicked a Google +1 button.
    LinkedIn Share The visitor has clicked a LinkedIn "Share" button.
    Twitter Follow The visitor has begun following someone on Twitter.
    Twitter Tweet The visitor has sent a Tweet from their Twitter account.
  4. To select a custom event, select the radio button next to "Custom defined event" and enter the name of the custom event in the text field. The name you enter will appear in the rule. Custom events can be published by using the Javascript Front-end API, you will have to enter the exact same event name as the one that is published.
  5. Click [OK].

Define the word(s) that must appear in the context

  1. Select whether the context must either contain the defined word(s) or must be an exact match with the defined word(s).
  2. Click the "any word" link if you want to define a specific word or words that must appear in the context.
  3. Select "Define word(s)".
  4. Enter a word in the text field and then click [Add].
  5. Repeat the above step for each word you want to add. If you enter more than one word, they have an OR relationship with each other which means any of the specified words satisfies the rule.
  6. Click [OK].

Define the value that must contain the defined word(s)

  1. Click the "any value" link.
  2. Expand the drop-down list and select the value from the array that contains the word(s) that you want to match. The options are "any value", "first value", "second value" and "third value".
  3. Click [OK].

When you have finished, the rule as it is defined is shown. For example:


Define how the value is set (add/set/Sum)

Select whether the value will be added, set to a value, or summed. If the profile property is empty, then the value you specify will become the value of the profile property regardless of whether you select "Add", "Set" or "Sum". If the profile property you specify already contains a value, then the following rules apply:

Action Rule
Add The new value is added to the existing value of the profile property (comma separated).
Set The new value overwrites the existing value in the profile property. Check the box next to "Only set if empty" to prevent overwriting, and only store the first value encountered for the user.
Sum Only when the profile property is a number and the value that is entered at the rule is also a number then these two values are added and the new value is stored in the profile property. In all other cases the rule will not change the existing value of the profile property.

Define the value(s)

Define the value for the profile property by clicking the value or the text "define value(s)": 

You have a number of options for defining the value:

  • Explicitly defining one or more values.
  • Using the date and time of the visit.
  • Using a value from the page using a custom selector.
  • Using a query string parameter value from the URL.
  • Using a part of the URL or mobile screen identifier, based on a regular expression.
  • Using a value from a cookie.
  • Using a value from Javascript

The following sections will go into more detail for each of these options.

Explicitly defining one or more values

  1. Select the "Define value(s)" radio button. An input field appears below "Define value(s)".
  2. Enter a value in the input field.
  3. Click the [Add] button. The value appears above the input field.
  4. Repeat the step above for each value you want to add. To delete a value, click the "x" icon behind it.
  5. When you are satisfied with the values, click [OK] to close the value popup.

Using the date and time of the visit

To use the date and time of the visitor's visit as the value for the profile property, select the "Visit Date and Time" radio button and then click [OK].

Using a value from the page using a custom selector

  1. Select the "Value from Page (custom selector)" radio button. Two input fields appear: "Name" and "Selector".
  2. In the "Name" field, enter a descriptive name for the custom value. The text you enter appears in the defined rule.
  3. Enter a valid jQuery selector to identify the position on the channel from which the value will value will be retrieved. For complete information on jQuery selectors, see http://api.jquery.com/category/selectors/.
  4. To specify the area of the channel from which the value will be retrieved using the Visual Picker, click Visual Picker.
  5. Click [OK].

Using the "clickContext" object for defining a custom value Selector

By default Behavior Listening searches for the first HTML element in the page that matches the Selector and retrieves the text that this element contains as the value to write to the profile. There are times, however, when you want to retrieve the value from an element that is relative to the element that the visitor clicked. For example, if there are several products present on a page and you want to store the name of the product that the visitor clicked on in their profile. In this situation, you need to search for a specific HTML element in the area surrounding the HTML element that was clicked.

For example, let's say you have the following HTML on a page:

 

<div class="product">
  <div class="product-name">Bose Wave Radio</div>
  <a href="#">More Info</a>
</div>


When the user clicks the "More Info" link, you want to store the value of the "product-name" div. By entering the following JavaScript statement in the "Selector" field, you can store the name of the specific product that the user clicked in their profile:

jQuery(clickContext).parent().find('.product-name')
  • Using a query string parameter value the URL.
  • Using a part of the URL, based on a regular expression.
  • Using a value from a cookie.



Using a query string parameter value from the URL

 

The URL of a web page sometimes contains useful information in the form of query string parameters. E.g. when the URL of a page is "http://www.example.com/index.html?name=ferret", the bit after the "?" is called the "query string", and in this case it contains a parameter "name" with the value "ferret".

To use the value of the parameter, enter its name after "Parameter name". In the above example, this would mean entering "name".

 

Using a part of the URL or mobile screen identifier, based on a regular expression

 

Select this option to use a part of the URL. To determine what part will be taken as a value, enter a regular expression in the field. The first "group" - i.e. the first part within parentheses - that is being matched will be used as a value. So for the url "www.example.com/index.html?name=ferret" the expression "www.(.*).com/.*" will result in the value "example".

 

Using a value from a cookie

 

Select the option "Value from a Cookie" to use the value of a visitor cookie. Enter the name of the cookie of which you want the value to be used.

 

Using a value from Javascript

 

Select the option "Value from a Javascript" to use the value of a Javascript variable that is available on the global scope (in other words: window.variable should exist).

To select a suitable variable, either type its name or use the VisualPicker to pick it from a webpage. Enter the URL of the webpage and the visual picker will display the variables and their values to the left of the page. Highlight the variable you want and click Apply to select the variable.

 

 

Define the profile property

Select the profile property to which the value you specify will be added, set to, or summed. See Profile properties for complete information on working with profile properties.

Once you have selected the profile property, click [OK].


Copying and deleting rules

Click here for information on copying and deleting rules in BlueConic.

 

The Behavior Listener is a standard plugin.