Any action on a website can be tracked as an event in Mapp Intelligence. Events can be simple like clicking on links or advanced such as tracking scroll or content engagement events. Measured actions are listed in the tool under Navigation > Events.

Action tracking requires active JavaScript in the visitor's browser. If not, the action on your website will be executed as normal, but not tracked. Action Tracking also needs:

  • name: Unique identification of the action.
  • parameter: Use parameters to enrich analytical data with your own website-specific information and/or metrics. Make sure you use the syntax guidelines when defining parameters.
  • goal: Needed when website goals are based on events.

Parameter

Action parameters must be set up under Configuration > Custom Parameters > Event Parameter before they can be used. The ID and data type (text/number) is defined for each parameter during setup.

Goals

Website goals help to track the success of your website. You can easily analyze and filter individual goals in the Mapp Intelligence tool. Furthermore, calculation of the customer journey is based on website goals. This means that you can track which individual campaigns are responsible for a goal's achievement.

Website goals have to be configured at Configuration > Goal.  When configuring tracking in the pixel, you need to include the ID as a number and the respective value as a string.

The website goal "Order" is predefined in Mapp. It is always reached as soon as an order value is tracked. If you have other website goals (e.g. registration, newsletter subscription), a goal parameter has to be set on the corresponding pages.

As soon as a parameter is tracked (no matter which value is submitted), the goal is set as achieved. Therefore it does not make sense to submit the value "no" for the goal "Newsletter Registration" if a user has not registered for the newsletter. Setting the value to "no" would instead mark the goal as achieved.

Methods

The action object contains the following four methods, which are contained in the objects data, parameter and goal:

  • set: Overwrites all existing values.
  • add: Overwrites only the corresponding values.
  • get: Returns the current configuration.
  • remove: Removes the current configuration or individual values.

data

set

/**
 * @param {{
 *      [name]: string,
 *      [parameter={}]: {[number]: string},
 *      [goal={}]: {[number]: string}
 * }} data
 *
 * @returns {wtSmart.action.data}
 */
wtSmart.action.data.set(data);
JS

add

/**
 * @param {{
 *      [name]: string,
 *      [parameter]: {[number]: string},
 *      [goal]: {[number]: string}
 * }} data
 *
 * @returns {wtSmart.action.data}
 */
wtSmart.action.data.add(data);
JS

get

/**
 * @returns {{
 *      name: string,
 *      parameter: {[number]: string},
 *      goal: {[number]: string}
 * }}
 */
wtSmart.action.data.get();
JS

remove

/**
 * @param {string[]} [removeList]
 *
 * @returns {wtSmart.action.data}
 */
wtSmart.action.data.remove(removeList);
JS

Example

// set action data
wtSmart.action.data.set({
    name: 'en.click.on.some.link',
    parameter: {
        1: 'en'
    },
    goal: {
        2: 'goal value 2'
    }
});

// add action data
wtSmart.action.data.add({
    name: 'en.click.on.some.link2'
});

// get action data
var data = wtSmart.action.data.get();
  
// remove all action data
wtSmart.action.data.remove();

// remove only name
wtSmart.action.data.remove(['name']);
JS

parameter

set

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.action.parameter}
 */
wtSmart.action.parameter.set(data);
JS

add

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.action.parameter}
 */
wtSmart.action.parameter.add(data);
JS

get

/**
 * @returns {{[number]: string}}
 */
wtSmart.action.parameter.get();
JS

remove

/**
 * @param {number[]} [removeList]
 *
 * @returns {wtSmart.action.parameter}
 */
wtSmart.action.parameter.remove();
JS

Example

// set action parameter
wtSmart.action.parameter.set({
    1: 'en'
});

// add action parameter
wtSmart.action.parameter.add({
    1: 'de',
    7: 'foo.bar'
});

// get action parameter
var data = wtSmart.action.parameter.get();
  
// remove all action parameter
wtSmart.action.parameter.remove();

// remove only action parameter 7
wtSmart.action.parameter.remove([7]);
JS

goal

set

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.action.goal}
 */
wtSmart.action.goal.set(data);
JS

add

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.action.goal}
 */
wtSmart.action.goal.add(data);
JS

get

/**
 * @returns {{[number]: string}}
 */
wtSmart.action.goal.get();
JS

remove

/**
 * @param {number[]} [removeList]
 *
 * @returns {wtSmart.action.goal}
 */
wtSmart.action.goal.remove(removeList);
JS

Example

// set action goal
wtSmart.action.goal.set({
	5: 'goal value 5'
});

// add action goal
wtSmart.action.goal.add({
	8: 'goal value 8'
});

// get action goal
var goal = wtSmart.action.goal.get();

// remove all action goals
wtSmart.action.goal.remove();

// remove only action goal 8
wtSmart.action.goal.remove([8]);
JS