Creating actions

Return to Introduction  Previous page  Next page

If the preconfigured actions don't meet the requirements of your business you can create your custom actions.

Select 'Actions' in the tree menu, click Add in the 'Actions' section on the right. Enter the new action name and click OK. New action settings edit dialog opens in the 'Action fields' section.

Defining action fields

Each action may have any number of fields where the system stores the information related to this action. A field is a part of a record reserved for a particular type of data. For example, logically, the 'Add to Cart' action can have such fields as 'productName' and 'quantity' to store information about the product name and the number of items placed in the shopping cart. These fields are associated with the action and are available for viewing when browsing a visitor's actions history.

Action fields can be added, modified or deleted. To add an action field:

1.Select Actions in the left-hand tree menu. Click Add. A new editable row appears (marked by a red asterisk).
2.Think of a system name for the new field and enter it into the empty input box in the 'Name' column. The name will be used to address the field within the system.

Note: An action field name can consist of letters a-z, A-Z, digits 0-9 and the underscore “_”. The first character cannot be a digit. The name must be unique.

3.By default the type of data which can be contained in a field is 'Text' but you can select a different type.
Text should be selected if you want the field to be able to contain textual data.
Integer should be selected if you want the contents of the field to be an integer value.
Real should be selected if you want the contents of the field to be a real number.
Logical (yes/no) should be selected if you want the contents of the field to be a flag value (the value of such a field may be either 'true' or 'false').
4.If you would like to create a new visitor profile field to store the action field value in it, select the 'Create a new field' from the drop-down box in the 'Store value in visitor field' column.

 


‘New action’ edit dialog: selecting 'Create a new field'.

‘New action’ edit dialog: selecting 'Create a new field'.

 

5.Enter the new field name, select the type of value. If you want to save an action field value for each visit select the 'Store value for each visit' check box, select 'Show in Profile' if you want the action field value to be shown in the Visitor's profile.

 


Creating a new visitor field.

Creating a new visitor field.

 

6.If you don't want to save the existing action field value in the Visitor's profile, select 'Don't store'.
7.Set the name by which you will recognize the field: click on the 'Comment' cell and enter the profile field name into the input box that will appear.

To delete an action field select the necessary action field and click Delete.

Action variants

The Sales-n-Stats system gathers the necessary information about the visitors and their activity on the website via so called external actions.  All preconfigured actions are external actions and do not have variants. But you also can add a pattern or a sequence of patterns (action variant) that will define what information to gather on the website yourself.

Action variant is a sequence of pageviews and form submits done by a visitor at your website. Each 'pageview' or 'form submit' is called an 'action step'. For example, the action 'Registration' may consist of 2 steps: registration form submit and displaying the 'Registration successful' page. Each action may have more than one variant. For example, if there are 2 registration forms at your site, short and verbose, both resulting in the same action – 'Registration'. However, it is more typical for an action to have only one variant. To define an action variant in the 'Variants' section, follow the next steps:

1.Right-click on the empty space of the 'Action variants' area in the 'Variants' section and select New action variant from the context menu.
2.'Select action type' dialog opens (for your convenience we included the most frequently used action variants in the list).
3.Select the necessary action variant from the list and click OK.

 


'Select action type' dialog

'Select action type' dialog

 

4.Enter the necessary URLs into the URL field or fields according to the action type. Click Save.

When you selected an appropriate action variant you should define action steps. Click on the image12 button to adjust the action pattern settings.

Pattern edit dialog opens. It consists of two sections:

'Identify by' section where you define the pattern that is used to identify this action step.
'Store data' section where you define which URL parameters or Form fields should be stored in the system when the action occurs.

Example

External action cannot be defined by a visitor's action on the site unlike other action variants. External action takes place only when a special event occurs. For example, an external action 'Order' takes place in two cases:

1.when a customer submits an order, or
2.when a site administrator processes an order manually.

An external action is recognized when the information about this action is entered into the database through the Sales-n-Stats integrator built into your shopping cart.

All action variants may include two types of patterns: 'Page View pattern' and 'Form submit pattern' or a combination of these patterns. For example, Submit form and go to page B action variant consists of two action steps 'Submit form' ('Form submit pattern') and 'Pageview' ('Page View pattern').


‘Action Steps‘ edit section

‘Action Steps‘ edit section

Pageview pattern and data capturing

There are two options in the 'Identify by' section, that can be used to identify a pageview: 'URL pattern' and 'SPAN tags'.

'URL pattern'

Enter an appropriate URL pattern to identify pageview by its URL. The syntax of the patterns is similar to zone patterns and is described in the 'Setting up zones' section.

Note: The default pattern http://*/* contains all site pages.

'SPAN tags'

A pageview can also be identified by the presence of specially formatted HTML tags (SPAN tags) in the body of HTML page. Go to the 'Span tags in the body of HTML' section to add the necessary parameters. Span tags can be used if it is impossible to identify pageview just by specifying a URL pattern.


'Pageview pattern & data capturing' dialog

'Pageview pattern & data capturing' dialog

Examples

Example 1.

You embed the following tag in your HTML page:

<SPAN ID=”sns_user_status”>registered</SPAN>

and then specify the 'sns_user_status' as a span tag name and 'registered' as a span tag value. This pattern will match when there is SPAN tag with the name 'sns_user_status' and value 'registered' in the body of HTML page.

Example 2.

There is the following tag in your HTML page

<SPAN ID=”order_total”>99.5</SPAN> 

where 'order_total' is a span tag name and '99.5' is a span tag value. This pattern will match where there is a SPAN tag with the name 'order_total' and value '99.5' in the body of HTML page.

To create a new parameter:

1.Click Add. 'Create a new parameter' dialog opens.
2.Enter the parameter name and its value into the corresponding fields.
3.Click OK.

The 'Store Pageview data' section allows you to define Form action parameters or SPAN tags which values you are going to store in the action fields. Form action parameters are the parameters which are located in the URL after the “?” sign. Click on Add to create a new row. 'Create a new Row' dialog opens, enter "Form action parameter" or "Span tag name" and select from the drop-down list an appropriate action field where you want to store the value of "Form action parameter".

You also can create a new action field:

1.Add a new row in the 'Form action parameters' section;
2.Select Add new Action Field. 'Create new Action Field' dialog opens.
3.Enter new action field name;
4.Click OK.

To delete a parameter select the one you would like to remove and click Del. Click Cancel to exit without changes.

Form submit pattern and data capturing

There are two options in the 'Identify Form by' section that can be used to identify a form submit: 'Form action URL' and 'Form Fields'.


'Form submit pattern & data capturing' dialog

'Form submit pattern & data capturing' dialog

 

Form action URL

It is the pattern that identifies URL where the HTML form is submitted to.  The syntax of the patterns is similar to zone patterns and is described in the 'Setting up zones' section.

Note: Please do not confuse form action URL with the URL where the form is located. To determine what the Form action URL is you should look into HTML code of the page: <FORM method="post" action="http://www.example.com/script.php"> The bold type text is the form action URL that identifies where this form is submitted to.

Form Fields

To identify a form submit Sales-n-Stats analyzes the set of form fields and sometimes their values. A form can also be identified by invisible fields which do not show in the browser, but are still present.

To add a form field:

Click Add button to create a new parameter. Enter the form field name and its value. In most cases form field value will be *. To delete a parameter select the one you would like to remove and click Del. In the 'Store Form data' section you define the 'Form action parameters' or 'Form fields' you want to save in the action fields:

1.Click Add to create a new row. 'Create a new Row' dialog opens.
2.Enter Form action parameter name or Form field name.
3.Select an appropriate action field from the drop-down list where you want to store the value of the 'Form action parameter' or the 'Form field'.

You can also create a new action field that will automatically appear in the 'Action fields' section.

To add a visitor field, follow the next steps:

1.Add a new row in the 'Form action parameters' or in the 'Form field' section.
2.Select 'Add new Action Field'.

 


'Create a new Row' dialog

'Create a new Row' dialog

 

3.'Create a new Action Field' dialog opens.

 


Creating new action field that will appear in the list of existing action fields in the ‘Action fields’ section.

Creating new action field that will appear in the list of existing action fields in the ‘Action fields’ section.

 

4.Enter new visitor field name, select the type and where you want to store the action field value.
5.If there is no appropriate visitor field in the 'Store To' drop-down list, select *Create a new field* to create one.
6.Fill in the 'Comment' field if necessary. Click OK.

To delete a parameter select the one you would like to remove and click Del. Click Cancel to exit without changes.

Adjusting system reactions

Reaction is an optional response of the system to a visitor's action executed on your site. There can be several reactions associated with each action. There are several types of reactions, for example, Push content, Post Message, Execute external program etc. To add a reaction click on the Reactions button. 'Conditions' dialog opens.

Setting Conditions

The 'Conditions' section is not necessary and allows you to configure conditions for triggering system reactions. There are two options in the 'Conditions' section to set those conditions that are necessary for the fulfillment of each reaction. If the reaction should be executed unconditionally leave 'Conditions' window blank.

To add conditions:

Click New row to add a condition row.
Click on the image12 button and choose the necessary property from the popup menu. You will see an expression entered into the field that appeared after you started the condition row. Then select an appropriate sign of relation (=, <,>, ≥, ≤, ≠) in the next field of the same condition row. If you select 'matches' you can create your own condition pattern using (*) instead of any element in a row. The last field in the condition row is meant for a textual or numeric value with which the actual value of a reaction property will be compared.

For example, setting conditions for the 'Add to Cart' action you choose action.productName property from the popup menu and then select 'matches'. In the next field of the row enter the following pattern: *CD*, where * is any element or elements (in the product name there can be any number of letters or figures in the * position).

To delete the condition click Remove next to it.

 


‘Condition‘ edit dialog: visual editor

‘Condition‘ edit dialog: visual editor

 

 

Use 'Macro mode' only if you possess some programming skills! Select the 'Macro mode' check box and enter the necessary condition parameters with the help of macro language. Using macro language you can set more complex and exact conditions than those you set using the visual editor.

Note: All conditions set in the visual editor can be seen when you select the 'Macro mode' check box.

To check if you entered the right parameters, click Check macro. If there is a mistake in the macro language the system displays the warning message.

 


'Condition' edit dialog: using macro

'Condition' edit dialog: using macro

 

 

Adjusting Operations

To specify what operations the system executes as a reaction click on the 'Operations' button. Then click Add and select the necessary operation from the drop-down list. You can set more than one operation and organize their order for the reaction.

Push URL - to direct a visitor to URL.
Push content - to send an optional content to a visitor.
HTTP request - to send the information about the action to other web application.
External execution - to run the program (for example: .exe).
Macro execution - to execute macro code.
Notify operator - to send a message and a sound file to an operator.
Post message - to post a message in the Visitor's profile.

Sales-n-Stats cannot generate reactions while the Operator Terminal (or Data Center in the Enterprise edition) is not running. Select the 'Postpone operation if Sales-n-Stats is offline' check box so that the reaction will take place when the Operator Terminal is launched. If the check box is not selected and Sales-n-Stats is not running; there will be no reaction when the action takes place.


Reaction operations edit dialog

Reaction operations edit dialog

 

To remove a reaction select it and click Delete.

 


See also:

Visitors' actions

Using preconfigured actions